History

Adding support for emissive and occlusion maps, on to pr land

samcake committed 10 years ago

Commit a0d7ce11 parent 2f5800a35 files · +241 −117Browse files

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

Unified · Split

libraries/render-utils/src/DebugDeferredBuffer.cpp+9−0
@@ -85,6 +85,13 @@ static const std::string DEFAULT_NORMAL_SHADER { · 84 unmodified lines
8585 " }"
8686 };
8787
88+static const std::string DEFAULT_OCCLUSION_SHADER{
89+ "vec4 getFragmentColor() {"
90+ " DeferredFragment frag = unpackDeferredFragmentNoPosition(uv);"
91+ " return vec4(vec3(frag.obscurance), 1.0);"
92+ " }"
93+};
94+
8895 static const std::string DEFAULT_EMISSIVE_SHADER{
8996 "vec4 getFragmentColor() {"
9097 " DeferredFragment frag = unpackDeferredFragmentNoPosition(uv);"
@@ -184,6 +191,8 @@ std::string DebugDeferredBuffer::getShaderSourceCode(Mode mode, std::string cust · 93 unmodified lines
184191 return DEFAULT_DEPTH_SHADER;
185192 case EmissiveMode:
186193 return DEFAULT_EMISSIVE_SHADER;
194+ case OcclusionMode:
195+ return DEFAULT_OCCLUSION_SHADER;
187196 case LightmapMode:
188197 return DEFAULT_LIGHTMAP_SHADER;
189198 case LightingMode: