Newb question here, but I’m trying to make my shaders full screen, I only know how to apply a material to a mesh. How do I make the shader applied to the whole scene, or camera?
This shader for example is full screen (but not Babylonjs) and its the kind of thing I want to achieve to effect the whole scene that I’m looking at.
https://glslsandbox.com/e#78007.0
But I am only able to apply it (sample code below)
How do I make the shader full screen? Am I missing something fundamental?
const mesh: Mesh = selectMesh(3, scene)
Effect.ShadersStore["customVertexShader"] = vertexShader
Effect.ShadersStore["customFragmentShader"] = circleZip
const shaderMaterial = new ShaderMaterial("shader", scene, {
vertex: "custom",
fragment: "custom",
},
{
attributes: ["position", "normal", "uv",],
uniforms: ["world", "worldView", "worldViewProjection", "view", "projection", "resolution"]
});
mesh.material = shaderMaterial;