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
59static const std::string DEFAULT_ALBEDO_SHADER {59static const std::string DEFAULT_ALBEDO_SHADER {
60 "vec4 getFragmentColor() {"60 "vec4 getFragmentColor() {"
61 " DeferredFragment frag = unpackDeferredFragmentNoPosition(uv);"61 " 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);"
63 " }"63 " }"
64};64};
65 65
@@ -93,7 +93,7 @@ static const std::string DEFAULT_OCCLUSION_SHADER{ · 27 unmodified lines
93static const std::string DEFAULT_EMISSIVE_SHADER{93static const std::string DEFAULT_EMISSIVE_SHADER{
94 "vec4 getFragmentColor() {"94 "vec4 getFragmentColor() {"
95 " DeferredFragment frag = unpackDeferredFragmentNoPosition(uv);"95 " 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));"
97 " }"97 " }"
98};98};
99 99
@@ -107,7 +107,7 @@ static const std::string DEFAULT_UNLIT_SHADER{ · 7 unmodified lines
107static const std::string DEFAULT_LIGHTMAP_SHADER{107static const std::string DEFAULT_LIGHTMAP_SHADER{
108 "vec4 getFragmentColor() {"108 "vec4 getFragmentColor() {"
109 " DeferredFragment frag = unpackDeferredFragmentNoPosition(uv);"109 " 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));"
111 " }"111 " }"
112};112};
113 113