Interrupt / systemshock

Shockolate - A minimalist and cross platform System Shock source port.
GNU General Public License v3.0
803 stars 62 forks source link

sq light intensity + make mutants invis in OpenGL #266

Closed donnierussellii closed 5 years ago

donnierussellii commented 5 years ago

Fix software invisible mutant disappears when near; see commit comment.

Square light intensity to make dark areas dark.

Add shader code to make OpenGL invisible mutants translucent.

donnierussellii commented 5 years ago

Already-pulled gamma factor commit included here for some reason.

Interrupt commented 5 years ago

Have a before / after screenshots of how this changes rendering? The OpenGL flow is borked on my dev laptop thanks to Apple, can't link with the 32bit Opengl anymore.

donnierussellii commented 5 years ago

I moved the light squaring to the shader.

float light = max(Light * Light, emissive); vs float light = max(Light, emissive);

squared_light unsquared_light

donnierussellii commented 5 years ago

Another set of screenshots.

float light = max(Light * Light, emissive); vs float light = max(Light, emissive);

squared_light unsquared_light

donnierussellii commented 5 years ago

Screenshot of invisible mutant in OpenGL.

invis_mutant_opengl

Interrupt commented 5 years ago

Looks nice! I'm not a fan of how single purpose that mutant value in the shader is, usually like shader values to be more general and multi purpose, but until we have a good use case for something else it's probably fine.