Does Opengl ES 2.0 support using the Render Target Component?
Can't seem to get it working.
Render Targets with Opengl ES 2.0
Moderator: Moderators
I'm not sure, it looks like it should work from this tutorial: http://blog.shayanjaved.com/2011/05/13/ ... o-texture/
Which use the same API functions as ZGE.
Can you post zgeproj-file for us to test?
Which use the same API functions as ZGE.
Can you post zgeproj-file for us to test?
I was following the RenderTexture example.
Seem like I should sample my render target texture in the fragment shader for the final image. But not sure how to send the image to the shader.
Seem like I should sample my render target texture in the fragment shader for the final image. But not sure how to send the image to the shader.
- Attachments
-
- GLES2D-RenderTexture.zgeproj
- (2.77 KiB) Downloaded 561 times
Hi jazz,
K
Correct. Any textures you add to the Material component are passed to the shader automatically ( as sampler2D ) using the naming convention tex1, tex2 etc. So simply add the line "uniform sampler2D tex1" in your fragment shader to access the RenderTarget you've applied to the Material.jazz wrote:Seem like I should sample my render target texture in the fragment shader for the final image. But not sure how to send the image to the shader.
K
Yep. Worked like a charm.
Thanks for the quick reply Kjell.
Thanks for the quick reply Kjell.
- Attachments
-
- GLES2D-RenderTexture.zgeproj
- (2.92 KiB) Downloaded 543 times