History

fix on android, merge android and windows forward pipelines

Anna committed 7 years ago

Commit 3a437cf1 parent 2fca7784 files · +10 −30Browse files

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

Unified · Split

libraries/render-utils/src/ToneMapAndResampleTask.cpp+4−11
@@ -29,7 +29,7 @@ ToneMapAndResample::ToneMapAndResample() { · 28 unmodified lines
2929 Parameters parameters;
3030 _parametersBuffer = gpu::BufferView(std::make_shared<gpu::Buffer>(sizeof(Parameters), (const gpu::Byte*) &parameters));
3131 }
32−/*
32+
3333 void ToneMapAndResample::init() {
3434 // shared_ptr to gpu::State
3535 gpu::StatePointer blitState = gpu::StatePointer(new gpu::State());
@@ -40,7 +40,6 @@ void ToneMapAndResample::init() { · 4 unmodified lines
4040 _pipeline = gpu::PipelinePointer(gpu::Pipeline::create(gpu::Shader::createProgram(toneMapping), blitState));
4141 _mirrorPipeline = gpu::PipelinePointer(gpu::Pipeline::create(gpu::Shader::createProgram(toneMapping_mirrored), blitState));
4242 }
43− */
4443
4544 void ToneMapAndResample::setExposure(float exposure) {
4645 auto& params = _parametersBuffer.get<Parameters>();
@@ -72,21 +71,15 @@ void ToneMapAndResample::run(const RenderContextPointer& renderContext, const In · 25 unmodified lines
7271 auto lightingBuffer = input->getRenderBuffer(0);
7372
7473 resampledFrameBuffer = args->_blitFramebuffer;
75−/*
74+
7675 if (!lightingBuffer || !resampledFrameBuffer) {
7776 return;
78− }*/
77+ }
7978
8079 if (resampledFrameBuffer != sourceFramebuffer) {
8180
8281 if (!_pipeline) {
83− gpu::StatePointer blitState = gpu::StatePointer(new gpu::State());
84−
85− blitState->setDepthTest(gpu::State::DepthTest(false, false));
86− blitState->setColorWriteMask(true, true, true, true);
87−
88− _pipeline = gpu::PipelinePointer(gpu::Pipeline::create(gpu::Shader::createProgram(toneMapping), blitState));
89− _mirrorPipeline = gpu::PipelinePointer(gpu::Pipeline::create(gpu::Shader::createProgram(toneMapping_mirrored), blitState));
82+ init();
9083 }
9184
9285 const auto bufferSize = resampledFrameBuffer->getSize();

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