diff options
author | Andreas Grois <andi@grois.info> | 2018-03-24 01:05:29 +0100 |
---|---|---|
committer | Andreas Grois <andi@grois.info> | 2018-03-24 01:05:29 +0100 |
commit | 257badb9eba2445e4ecd67893cc2979227f51da3 (patch) | |
tree | ad65129818b078b10eec9d032fb08c031d16c25b /BuddhaTest/src/BuddhaTest.cpp | |
parent | 53a8f22f9d46caf533edf5081477ab36c57c7c89 (diff) |
Importance map is now filled with data.
All that's missing is to use the **non-cached** importance map to generate orbit starting points.
Diffstat (limited to 'BuddhaTest/src/BuddhaTest.cpp')
-rw-r--r-- | BuddhaTest/src/BuddhaTest.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/BuddhaTest/src/BuddhaTest.cpp b/BuddhaTest/src/BuddhaTest.cpp index ac7cebe..cc6bc83 100644 --- a/BuddhaTest/src/BuddhaTest.cpp +++ b/BuddhaTest/src/BuddhaTest.cpp @@ -127,9 +127,9 @@ int main(int argc, char * argv[]) GLuint importanceMapBuffer; glGenBuffers(1,&importanceMapBuffer); glBindBuffer(GL_SHADER_STORAGE_BUFFER,importanceMapBuffer); - glBufferData(GL_SHADER_STORAGE_BUFFER,4*8193,nullptr, GL_DYNAMIC_COPY); //128*64+1. one larger than the map itself -> max brightness. Aspect 2:1 because mandel is symmetric around x + glBufferData(GL_SHADER_STORAGE_BUFFER,4*(100*50),nullptr, GL_DYNAMIC_COPY); //100*50 pixels. Map is symmetric around x-axis. This size is *hardcoded* in the shader! glClearBufferData(GL_SHADER_STORAGE_BUFFER,GL_R8,GL_RED,GL_UNSIGNED_INT,nullptr); - glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 4, brightnessBuffer); + glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 4, importanceMapBuffer); //the state buffer is special. While making each entry 8 bytes large and using std430 layout, the data is never read back, //so we can get away with being more lenient and allowing the compiler to choose layout without much extra work. |