Changeset 055750a in opengl-game for shaders/scene.vert
- Timestamp:
- Dec 4, 2019, 9:33:43 PM (5 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- 785333b, cf727ca
- Parents:
- e1308e8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
shaders/scene.vert
re1308e8 r055750a 2 2 #extension GL_ARB_separate_shader_objects : enable 3 3 4 struct Object { 5 mat4 model; 6 }; 7 4 8 layout (binding = 0) uniform UniformBufferObject { 5 mat4 model;6 9 mat4 view; 7 10 mat4 proj; 8 11 } ubo; 12 13 layout(binding = 1) readonly buffer StorageBufferObject { 14 Object objects[]; 15 } sbo; 9 16 10 17 layout(location = 0) in vec3 inPosition; … … 19 26 fragTexCoord = inTexCoord; 20 27 21 gl_Position = ubo.proj * ubo.view * ubo.model * vec4(inPosition, 1.0);28 gl_Position = ubo.proj * ubo.view * sbo.objects[0].model * vec4(inPosition, 1.0); 22 29 }
Note:
See TracChangeset
for help on using the changeset viewer.