Subversion Repository Public Repository

Divide-Framework

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

Diff Revisions 911 vs 912 for /trunk/Source Code/Rendering/PostFX/CustomOperators/BloomPreRenderOperator.cpp

Diff revisions: vs.
  @@ -21,12 +21,12 @@
21 21 vec2<U16> res(parent.inputRT().getWidth(), parent.inputRT().getHeight());
22 22
23 23 vectorImpl<RTAttachmentDescriptor> att = {
24 - { parent.inputRT().getAttachment(RTAttachment::Type::Colour, 0).texture()->getDescriptor(), RTAttachment::Type::Colour, 0, DefaultColours::BLACK() },
24 + { parent.inputRT().getAttachment(RTAttachmentType::Colour, 0).texture()->getDescriptor(), RTAttachmentType::Colour, 0, DefaultColours::BLACK() },
25 25 };
26 26
27 27 RenderTargetDescriptor desc = {};
28 28 desc._resolution = res;
29 - desc._attachmentCount = to_U32(att.size());
29 + desc._attachmentCount = to_U8(att.size());
30 30 desc._attachments = att.data();
31 31
32 32 desc._name = "Bloom_Blur_0";
  @@ -89,7 +89,7 @@
89 89 RenderTarget* screen = &_parent.inputRT();
90 90
91 91 // Step 1: generate bloom
92 - screen->bind(to_U8(ShaderProgram::TextureUsage::UNIT0), RTAttachment::Type::Colour, 0); //screen
92 + screen->bind(to_U8(ShaderProgram::TextureUsage::UNIT0), RTAttachmentType::Colour, 0); //screen
93 93
94 94 // render all of the "bright spots"
95 95 _bloomOutput._rt->begin(RenderTarget::defaultPolicy());
  @@ -102,7 +102,7 @@
102 102 _blur->bind();
103 103 // Blur horizontally
104 104 _blur->SetSubroutine(ShaderType::FRAGMENT, _horizBlur);
105 - _bloomOutput._rt->bind(to_U8(ShaderProgram::TextureUsage::UNIT0), RTAttachment::Type::Colour, 0);
105 + _bloomOutput._rt->bind(to_U8(ShaderProgram::TextureUsage::UNIT0), RTAttachmentType::Colour, 0);
106 106 _bloomBlurBuffer[0]._rt->begin(RenderTarget::defaultPolicy());
107 107 pipelineDescriptor._shaderProgram = _blur;
108 108 triangleCmd.pipeline(_context.newPipeline(pipelineDescriptor));
  @@ -111,15 +111,15 @@
111 111
112 112 // Blur vertically (recycle the render target. We have a copy)
113 113 _blur->SetSubroutine(ShaderType::FRAGMENT, _vertBlur);
114 - _bloomBlurBuffer[0]._rt->bind(to_U8(ShaderProgram::TextureUsage::UNIT0), RTAttachment::Type::Colour, 0);
114 + _bloomBlurBuffer[0]._rt->bind(to_U8(ShaderProgram::TextureUsage::UNIT0), RTAttachmentType::Colour, 0);
115 115 _bloomBlurBuffer[1]._rt->begin(RenderTarget::defaultPolicy());
116 116 _context.draw(triangleCmd);
117 117 _bloomBlurBuffer[1]._rt->end();
118 118
119 119 // Step 3: apply bloom
120 120 _bloomBlurBuffer[0]._rt->blitFrom(screen);
121 - _bloomBlurBuffer[0]._rt->bind(to_U8(ShaderProgram::TextureUsage::UNIT0), RTAttachment::Type::Colour, 0); //Screen
122 - _bloomBlurBuffer[1]._rt->bind(to_U8(ShaderProgram::TextureUsage::UNIT1), RTAttachment::Type::Colour, 0); //Bloom
121 + _bloomBlurBuffer[0]._rt->bind(to_U8(ShaderProgram::TextureUsage::UNIT0), RTAttachmentType::Colour, 0); //Screen
122 + _bloomBlurBuffer[1]._rt->bind(to_U8(ShaderProgram::TextureUsage::UNIT1), RTAttachmentType::Colour, 0); //Bloom
123 123 screen->begin(_screenOnlyDraw);
124 124 pipelineDescriptor._shaderProgram = _bloomApply;
125 125 triangleCmd.pipeline(_context.newPipeline(pipelineDescriptor));