Hello, I’m researching materials to realize an interesting idea that came to mind.
This PG uses a shader as a post-process to create a CRT-like effect.
Instead of post-processing, is it possible to draw the background with shader code before drawing the mesh using pre-processing?
Using a shader in scene.clear or…?
That’s an interesting question. For sure you can do it with a mesh rendered first, but I’ll be interested in other answers for a custom scene.clear with a shader
You could always have a plane take up the cameras full frustrum and then have a custom shader on that. then user rendering groups to put that in the back and everything else in front of it.
I was able to achieve one of the desired effects. Thank you for your help.
However, I have a question regarding an area in the video that I couldn’t quite understand.
The position and scale values don’t seem to work at all. Is it possible for the vertex shader to directly modify the grid area of the mesh? If so, why does size: 1 decrease the size?
my.vertex.fx
#version 300 es
precision highp float;
// Attributes
in vec3 position;
in vec2 uv;
// Varyings
out vec2 vUV;
void main(void) {
vUV = uv;
gl_Position = vec4(position, 1.0);
}