History

Adding reflection of the ambient map for translucent

samcake committed 10 years ago

Commit 88f816f2 parents 4202e60 b95c81d644 files · +5265 −1186Browse files

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

Unified · Split

libraries/render-utils/src/GeometryCache.cpp+5−5
@@ -506,9 +506,9 @@ GeometryCache::GeometryCache() : · 505 unmodified lines
506 std::make_shared<render::ShapePipeline>(getSimplePipeline(), nullptr,506 std::make_shared<render::ShapePipeline>(getSimplePipeline(), nullptr,
507 [](const render::ShapePipeline&, gpu::Batch& batch) {507 [](const render::ShapePipeline&, gpu::Batch& batch) {
508 // Set the defaults needed for a simple program508 // Set the defaults needed for a simple program
509 batch.setResourceTexture(render::ShapePipeline::Slot::ALBEDO_MAP,509 batch.setResourceTexture(render::ShapePipeline::Slot::MAP::ALBEDO,
510 DependencyManager::get<TextureCache>()->getWhiteTexture());510 DependencyManager::get<TextureCache>()->getWhiteTexture());
511 batch.setResourceTexture(render::ShapePipeline::Slot::NORMAL_FITTING_MAP,511 batch.setResourceTexture(render::ShapePipeline::Slot::MAP::NORMAL_FITTING,
512 DependencyManager::get<TextureCache>()->getNormalFittingTexture());512 DependencyManager::get<TextureCache>()->getNormalFittingTexture());
513 }513 }
514 );514 );
@@ -1736,11 +1736,11 @@ void GeometryCache::bindSimpleProgram(gpu::Batch& batch, bool textured, bool cul · 1221 unmodified lines
1736 1736
1737 // If not textured, set a default albedo map1737 // If not textured, set a default albedo map
1738 if (!textured) {1738 if (!textured) {
1739 batch.setResourceTexture(render::ShapePipeline::Slot::ALBEDO_MAP,1739 batch.setResourceTexture(render::ShapePipeline::Slot::MAP::ALBEDO,
1740 DependencyManager::get<TextureCache>()->getWhiteTexture());1740 DependencyManager::get<TextureCache>()->getWhiteTexture());
1741 }1741 }
1742 // Set a default normal map1742 // Set a default normal map
1743 batch.setResourceTexture(render::ShapePipeline::Slot::NORMAL_FITTING_MAP,1743 batch.setResourceTexture(render::ShapePipeline::Slot::MAP::NORMAL_FITTING,
1744 DependencyManager::get<TextureCache>()->getNormalFittingTexture());1744 DependencyManager::get<TextureCache>()->getNormalFittingTexture());
1745}1745}
1746 1746
@@ -1758,7 +1758,7 @@ gpu::PipelinePointer GeometryCache::getSimplePipeline(bool textured, bool culled · 11 unmodified lines
1758 _emissiveShader = gpu::Shader::createProgram(VS, PSEmissive);1758 _emissiveShader = gpu::Shader::createProgram(VS, PSEmissive);
1759 1759
1760 gpu::Shader::BindingSet slotBindings;1760 gpu::Shader::BindingSet slotBindings;
1761 slotBindings.insert(gpu::Shader::Binding(std::string("normalFittingMap"), render::ShapePipeline::Slot::NORMAL_FITTING_MAP));1761 slotBindings.insert(gpu::Shader::Binding(std::string("normalFittingMap"), render::ShapePipeline::Slot::MAP::NORMAL_FITTING));
1762 gpu::Shader::makeProgram(*_simpleShader, slotBindings);1762 gpu::Shader::makeProgram(*_simpleShader, slotBindings);
1763 gpu::Shader::makeProgram(*_emissiveShader, slotBindings);1763 gpu::Shader::makeProgram(*_emissiveShader, slotBindings);
1764 });1764 });

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