Advertisement
Guest User

Untitled

a guest
Dec 17th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. i am using the following textures as input uniforms: https://puu.sh/yIiA6/242a3e9835.png
  2. i have two shaders:
  3.  
  4. - Shader A selects two textures from 20 (one from the first 10 and one from the second 10) based on time (in sequence), adds them together (as floats) and adds noise.
  5.  
  6. - Shader B just adds the textures from two input uniforms together (as floats).
  7. (the floating point addition makes this look weird compared to normal additive blending, this is intended)
  8.  
  9. i have 5 draw calls:
  10.  
  11. - draw call 1 renders shader B, binding textures "Dead (1).png" and "Idle (1).png" to a new texture that is created, using framebuffer ID 2
  12.  
  13. - draw call 2 renders shader A, binding textures "Dead (1).png" through "Dead(10).png" and "Idle(1).png" through "Idle(10).png" to a new texture that is created, using framebuffer ID 1
  14.  
  15. - draw call 3 renders shader B, binding textures "Dead (1).png" and "Idle (1).png" to the screen's top-left corner, using framebuffer id 0
  16. (this is essentially to show what SHOULD be in framebuffer 2)
  17.  
  18. - draw call 4 renders shader A, binding textures "Dead (1).png" through "Dead(10).png" and "Idle(1).png" through "Idle(10).png" to the screen's bottom-left corner, using framebuffer id 0
  19. (this is essentially to show what SHOULD be in framebuffer 1)
  20.  
  21. - draw call 5 renders shader A, binding textures associated with framebuffers 1 and 2 to the middle-right of the screen, using framebuffer id 0
  22.  
  23. this is the resulting rendering: https://puu.sh/yIiMv/ea595fd449.mp4
  24.  
  25. if instead of creating new textures for the render buffer, i load the existing textures jump (1).png and jump (2).png i get this: https://puu.sh/yIiPX/e90541d76b.mp4
  26.  
  27. neither of these results is quite what i would expect, when applying the shader that forms the bottom-left image from two input images, to the two images on the left side...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement