Hi Daniels, it will be possible but need to convert the GLSL shader from your link to OpenGL 2.0 shader. In your link, shader is for opengl core 4.0. GLScene use Opengl Legacy (opengl version < 3.0)
Hi, Daniel SSRwork as fullscreen postprocessing. Basically each texure correspond to depth, normal, specular and color buffer.
The position is represented by the depth buffer and normal buffer give you the direction
The colors provide from the color buffer
Finally all are blended in a resulting reflections according to the specular buffer
And you're right all are accesing throw the G-Buffer.
Check GLSPostShaders.pas in sources/shader folder for see how to make a post shader
In GLScene you can have access to the buffers with Opengl frame buffer (TGLFBORenderer) last entry in the scene editor. Take a look in Examples\effects\shadowFBO, \Samples\materials\TransparencyAdvanced and in \Samples\rendering\multisampletexture for how to use it.
PS : For samples perhaps, you'll need to add GLScene_Runtime package in the depencies of the projects
Hi!
Has anyone tried to implement SSR in GLScene?
I would love some pointers on how to do it.
http://imanolfotia.com/blog/update/2017/03/11/ScreenSpaceReflections.html
Cheers
Hi Daniels, it will be possible but need to convert the GLSL shader from your link to OpenGL 2.0 shader. In your link, shader is for opengl core 4.0. GLScene use Opengl Legacy (opengl version < 3.0)
You can try this
Check also here : https://www.gamedev.net/forums/topic/638355-screen-space-reflections-issues/ , https://www.gamedev.net/forums/topic/663280-screen-space-reflections-again/ and here http://ephenationopengl.blogspot.com/2014/01/simulate-wet-surface-with-screen-space.html
Thanks, I will try that shader!
Any tips on how to get these uniforms from GLScene?
Are they all textures?
uniform sampler2D gColor;
uniform sampler2D gPosition;
uniform sampler2D gNormal;
uniform sampler2D gEffect;
All above uniforms are from gBuffer right?
Is it possible to fetch it from the TGLScene object, or should it be direct OpenGL-code?
Hi, Daniel SSRwork as fullscreen postprocessing. Basically each texure correspond to depth, normal, specular and color buffer.
The position is represented by the depth buffer and normal buffer give you the direction
The colors provide from the color buffer
Finally all are blended in a resulting reflections according to the specular buffer
And you're right all are accesing throw the G-Buffer.
Check GLSPostShaders.pas in sources/shader folder for see how to make a post shader
In GLScene you can have access to the buffers with Opengl frame buffer (TGLFBORenderer) last entry in the scene editor. Take a look in Examples\effects\shadowFBO, \Samples\materials\TransparencyAdvanced and in \Samples\rendering\multisampletexture for how to use it.
PS : For samples perhaps, you'll need to add GLScene_Runtime package in the depencies of the projects
Finally this is a really good resources web site on opengl rendering technique
https://learnopengl.com/Advanced-Lighting/Deferred-Shading for more informations
An anothers on SSR : https://www.youtube.com/watch?v=K2rs7K4y_sY
http://imanolfotia.com/blog/update/2017/03/11/ScreenSpaceReflections.html