History

Cleaning up the lighting with the simpler approach where emissive and lightmap is displayed on forward

samcake committed 10 years ago

Commit 2fbdb221 parent ed67fe429 files · +269 −355Browse files

Showing the changes to libraries/render-utils/src/DebugDeferredBuffer.cpp (1 of 29 files). Show all

Unified · Split

libraries/render-utils/src/DebugDeferredBuffer.cpp+3−3
@@ -59,7 +59,7 @@ enum Slot { · 58 unmodified lines
5959 static const std::string DEFAULT_ALBEDO_SHADER {
6060 "vec4 getFragmentColor() {"
6161 " DeferredFragment frag = unpackDeferredFragmentNoPosition(uv);"
62− " return vec4(pow(frag.diffuse, vec3(1.0 / 2.2)), 1.0);"
62+ " return vec4(pow(frag.albedo, vec3(1.0 / 2.2)), 1.0);"
6363 " }"
6464 };
6565
@@ -93,7 +93,7 @@ static const std::string DEFAULT_OCCLUSION_SHADER{ · 27 unmodified lines
9393 static const std::string DEFAULT_EMISSIVE_SHADER{
9494 "vec4 getFragmentColor() {"
9595 " DeferredFragment frag = unpackDeferredFragmentNoPosition(uv);"
96− " return (frag.mode == FRAG_MODE_SHADED ? vec4(pow(frag.emissive, vec3(1.0 / 2.2)), 1.0) : vec4(vec3(0.0), 1.0));"
96+ " return (frag.mode == FRAG_MODE_SHADED ? vec4(pow(texture(specularMap, uv).rgb, vec3(1.0 / 2.2)), 1.0) : vec4(vec3(0.0), 1.0));"
9797 " }"
9898 };
9999
@@ -107,7 +107,7 @@ static const std::string DEFAULT_UNLIT_SHADER{ · 7 unmodified lines
107107 static const std::string DEFAULT_LIGHTMAP_SHADER{
108108 "vec4 getFragmentColor() {"
109109 " DeferredFragment frag = unpackDeferredFragmentNoPosition(uv);"
110− " return (frag.mode == FRAG_MODE_LIGHTMAPPED ? vec4(pow(frag.emissive, vec3(1.0 / 2.2)), 1.0) : vec4(vec3(0.0), 1.0));"
110+ " return (frag.mode == FRAG_MODE_LIGHTMAPPED ? vec4(pow(texture(specularMap, uv).rgb, vec3(1.0 / 2.2)), 1.0) : vec4(vec3(0.0), 1.0));"
111111 " }"
112112 };
113113