Skip to main content
5 events
when toggle format what by license comment
Oct 7, 2020 at 17:41 comment added bay jose This was more of an approach question, I haven't tried to implement this yet, I wanted to know if there was a way to send data in parallel to multiple shaders. It was probing for information on how to implement this concept to help me better decide how to do what I want to do.
Oct 7, 2020 at 17:36 comment added DMGregory Always test and profile to see if it's behaving as you want. If it's not, post here with a Minimal Complete Verifiable Example showing how you've implemented the feature and how the results differ from what you want/expect.
Oct 7, 2020 at 17:30 comment added bay jose Ah! I didn't realize the buffers were not flushed when using a different shading program. So i should just be able to use shader A, buffer my VAO into V-Ram do shader A's drawArraysInstanced then use shader B for lights, and the data will still be there. Cool Cool, did not realize this!
Oct 7, 2020 at 17:27 comment added DMGregory Generally you have two steps: 1) upload a buffer of geometry information to the GPU, 2) invoke a particular shader program using that geometry information. These are wholly separate operations. Step 2 doesn't delete the step 1 data from the GPU and force you to re-upload it again. It's still there. You can just do step 2 again with the same geometry buffer and a different shader program. Where have you run into difficulty implementing this?
Oct 7, 2020 at 17:03 history asked bay jose CC BY-SA 4.0