Subversion Repository Public Repository

Divide-Framework

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

Diff Revisions 830 vs 867 for /trunk/Source Code/Rendering/PostFX/CustomOperators/BloomPreRenderOperator.cpp

Diff revisions: vs.
  @@ -56,8 +56,8 @@
56 56 void BloomPreRenderOperator::reshape(U16 width, U16 height) {
57 57 PreRenderOperator::reshape(width, height);
58 58
59 - U16 w = to_ushort(width / 4.0f);
60 - U16 h = to_ushort(height / 4.0f);
59 + U16 w = to_U16(width / 4.0f);
60 + U16 h = to_U16(height / 4.0f);
61 61 _bloomOutput._rt->create(w, h);
62 62 _bloomBlurBuffer[0]._rt->create(width, height);
63 63 _bloomBlurBuffer[1]._rt->create(width, height);
  @@ -75,7 +75,7 @@
75 75 RenderTarget* screen = &_parent.inputRT();
76 76
77 77 // Step 1: generate bloom
78 - screen->bind(to_const_ubyte(ShaderProgram::TextureUsage::UNIT0), RTAttachment::Type::Colour, 0); //screen
78 + screen->bind(to_const_U8(ShaderProgram::TextureUsage::UNIT0), RTAttachment::Type::Colour, 0); //screen
79 79
80 80 // render all of the "bright spots"
81 81 _bloomOutput._rt->begin(RenderTarget::defaultPolicy());
  @@ -87,7 +87,7 @@
87 87 _blur->bind();
88 88 // Blur horizontally
89 89 _blur->SetSubroutine(ShaderType::FRAGMENT, _horizBlur);
90 - _bloomOutput._rt->bind(to_const_ubyte(ShaderProgram::TextureUsage::UNIT0), RTAttachment::Type::Colour, 0);
90 + _bloomOutput._rt->bind(to_const_U8(ShaderProgram::TextureUsage::UNIT0), RTAttachment::Type::Colour, 0);
91 91 _bloomBlurBuffer[0]._rt->begin(RenderTarget::defaultPolicy());
92 92 triangleCmd.shaderProgram(_blur);
93 93 _context.draw(triangleCmd);
  @@ -95,7 +95,7 @@
95 95
96 96 // Blur vertically (recycle the render target. We have a copy)
97 97 _blur->SetSubroutine(ShaderType::FRAGMENT, _vertBlur);
98 - _bloomBlurBuffer[0]._rt->bind(to_const_ubyte(ShaderProgram::TextureUsage::UNIT0), RTAttachment::Type::Colour, 0);
98 + _bloomBlurBuffer[0]._rt->bind(to_const_U8(ShaderProgram::TextureUsage::UNIT0), RTAttachment::Type::Colour, 0);
99 99 _bloomBlurBuffer[1]._rt->begin(RenderTarget::defaultPolicy());
100 100 triangleCmd.shaderProgram(_blur);
101 101 _context.draw(triangleCmd);
  @@ -103,8 +103,8 @@
103 103
104 104 // Step 3: apply bloom
105 105 _bloomBlurBuffer[0]._rt->blitFrom(screen);
106 - _bloomBlurBuffer[0]._rt->bind(to_const_ubyte(ShaderProgram::TextureUsage::UNIT0), RTAttachment::Type::Colour, 0); //Screen
107 - _bloomBlurBuffer[1]._rt->bind(to_const_ubyte(ShaderProgram::TextureUsage::UNIT1), RTAttachment::Type::Colour, 0); //Bloom
106 + _bloomBlurBuffer[0]._rt->bind(to_const_U8(ShaderProgram::TextureUsage::UNIT0), RTAttachment::Type::Colour, 0); //Screen
107 + _bloomBlurBuffer[1]._rt->bind(to_const_U8(ShaderProgram::TextureUsage::UNIT1), RTAttachment::Type::Colour, 0); //Bloom
108 108 screen->begin(_screenOnlyDraw);
109 109 triangleCmd.shaderProgram(_bloomApply);
110 110 _context.draw(triangleCmd);