Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 934 vs 938 for /trunk/Source Code/Rendering/PostFX/CustomOperators/BloomPreRenderOperator.cpp

Diff revisions: vs.
  @@ -95,10 +95,9 @@
95 95
96 96 // Step 1: generate bloom
97 97 TextureData data = screen._rt->getAttachment(RTAttachmentType::Colour, 0).texture()->getData(); //screen
98 - data.setBinding(to_U32(ShaderProgram::TextureUsage::UNIT0));
99 98
100 99 GFX::BindDescriptorSetsCommand descriptorSetCmd;
101 - descriptorSetCmd._set._textureData.addTexture(data);
100 + descriptorSetCmd._set._textureData.addTexture(data, to_U8(ShaderProgram::TextureUsage::UNIT0));
102 101 GFX::BindDescriptorSets(bufferInOut, descriptorSetCmd);
103 102
104 103 // render all of the "bright spots"
  @@ -121,9 +120,8 @@
121 120 GFX::BindPipeline(bufferInOut, pipelineCmd);
122 121
123 122 data = _bloomOutput._rt->getAttachment(RTAttachmentType::Colour, 0).texture()->getData();
124 - data.setBinding(to_U32(ShaderProgram::TextureUsage::UNIT0));
125 123 descriptorSetCmd._set._textureData.clear();
126 - descriptorSetCmd._set._textureData.addTexture(data);
124 + descriptorSetCmd._set._textureData.addTexture(data, to_U8(ShaderProgram::TextureUsage::UNIT0));
127 125 GFX::BindDescriptorSets(bufferInOut, descriptorSetCmd);
128 126
129 127 beginRenderPassCmd._target = _bloomBlurBuffer[0]._targetID;
  @@ -144,9 +142,8 @@
144 142 GFX::BindPipeline(bufferInOut, pipelineCmd);
145 143
146 144 data = _bloomBlurBuffer[0]._rt->getAttachment(RTAttachmentType::Colour, 0).texture()->getData();
147 - data.setBinding(to_U32(ShaderProgram::TextureUsage::UNIT0));
148 145 descriptorSetCmd._set._textureData.clear();
149 - descriptorSetCmd._set._textureData.addTexture(data);
146 + descriptorSetCmd._set._textureData.addTexture(data, to_U8(ShaderProgram::TextureUsage::UNIT0));
150 147 GFX::BindDescriptorSets(bufferInOut, descriptorSetCmd);
151 148
152 149 beginRenderPassCmd._target = _bloomBlurBuffer[1]._targetID;
  @@ -164,15 +161,11 @@
164 161 GFX::BlitRenderTarget(bufferInOut, blitRTCommand);
165 162
166 163 TextureData data0 = _bloomBlurBuffer[0]._rt->getAttachment(RTAttachmentType::Colour, 0).texture()->getData(); //Screen
167 - data0.setBinding(to_U32(ShaderProgram::TextureUsage::UNIT0));
168 164 TextureData data1 = _bloomBlurBuffer[1]._rt->getAttachment(RTAttachmentType::Colour, 0).texture()->getData(); //Bloom
169 - data1.setBinding(to_U32(ShaderProgram::TextureUsage::UNIT1));
170 165
171 - data = _bloomBlurBuffer[0]._rt->getAttachment(RTAttachmentType::Colour, 0).texture()->getData();
172 - data.setBinding(to_U32(ShaderProgram::TextureUsage::UNIT0));
173 166 descriptorSetCmd._set._textureData.clear();
174 - descriptorSetCmd._set._textureData.addTexture(data0);
175 - descriptorSetCmd._set._textureData.addTexture(data1);
167 + descriptorSetCmd._set._textureData.addTexture(data0, to_U8(ShaderProgram::TextureUsage::UNIT0));
168 + descriptorSetCmd._set._textureData.addTexture(data1, to_U8(ShaderProgram::TextureUsage::UNIT1));
176 169 GFX::BindDescriptorSets(bufferInOut, descriptorSetCmd);
177 170
178 171 pipelineDescriptor._shaderProgram = _bloomApply;