History

Changing diffuse to albedo and breaking everything...

samcake committed 10 years ago

Commit 0ad7bac1 parent 6eda7aa31 files · +107 −139Browse files

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

Unified · Split

libraries/render-utils/src/DebugDeferredBuffer.cpp+7−7
@@ -39,7 +39,7 @@ void DebugDeferredBufferConfig::setMode(int newMode) { · 38 unmodified lines
3939 }
4040
4141 enum Slot {
42− Diffuse = 0,
42+ Albedo = 0,
4343 Normal,
4444 Specular,
4545 Depth,
@@ -52,9 +52,9 @@ enum Slot { · 6 unmodified lines
5252
5353
5454
55−static const std::string DEFAULT_DIFFUSE_SHADER {
55+static const std::string DEFAULT_ALBEDO_SHADER {
5656 "vec4 getFragmentColor() {"
57− " return vec4(pow(texture(diffuseMap, uv).xyz, vec3(1.0 / 2.2)), 1.0);"
57+ " return vec4(pow(texture(albedoMap, uv).xyz, vec3(1.0 / 2.2)), 1.0);"
5858 " }"
5959 };
6060
@@ -144,8 +144,8 @@ DebugDeferredBuffer::DebugDeferredBuffer() { · 83 unmodified lines
144144
145145 std::string DebugDeferredBuffer::getShaderSourceCode(Mode mode, std::string customFile) {
146146 switch (mode) {
147− case DiffuseMode:
148− return DEFAULT_DIFFUSE_SHADER;
147+ case AlbedoMode:
148+ return DEFAULT_ALBEDO_SHADER;
149149 case SpecularMode:
150150 return DEFAULT_SPECULAR_SHADER;
151151 case RoughnessMode:
@@ -206,7 +206,7 @@ const gpu::PipelinePointer& DebugDeferredBuffer::getPipeline(Mode mode, std::str · 54 unmodified lines
206206 const auto program = gpu::Shader::createProgram(vs, ps);
207207
208208 gpu::Shader::BindingSet slotBindings;
209− slotBindings.insert(gpu::Shader::Binding("diffuseMap", Diffuse));
209+ slotBindings.insert(gpu::Shader::Binding("albedoMap", Albedo));
210210 slotBindings.insert(gpu::Shader::Binding("normalMap", Normal));
211211 slotBindings.insert(gpu::Shader::Binding("specularMap", Specular));
212212 slotBindings.insert(gpu::Shader::Binding("depthMap", Depth));
@@ -262,7 +262,7 @@ void DebugDeferredBuffer::run(const SceneContextPointer& sceneContext, const Ren · 49 unmodified lines
262262
263263 batch.setPipeline(getPipeline(_mode, first));
264264
265− batch.setResourceTexture(Diffuse, framebufferCache->getDeferredColorTexture());
265+ batch.setResourceTexture(Albedo, framebufferCache->getDeferredColorTexture());
266266 batch.setResourceTexture(Normal, framebufferCache->getDeferredNormalTexture());
267267 batch.setResourceTexture(Specular, framebufferCache->getDeferredSpecularTexture());
268268 batch.setResourceTexture(Depth, framebufferCache->getPrimaryDepthTexture());

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t