-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
need a example for effect module and post-processing #1412
Comments
I also needed this and my current understanding is that you have to use it like this (with the example for tiltshift): Your fragment shader uniform sampler2D uSampler;
uniform vec2 uSamplerSize;
varying vec2 uv;
void main() {
gl_FragColor = tiltShift_sampleColor(uSampler, uSamplerSize, uv);
} main.js import {tiltShift} from '@luma.gl/shadertools';
[...]
const yourTiltShiftModel = new Model(gl, {
vs: yourVertexShader,
fs: yourFragmentShader,
geometry: yourGeometry,
modules: [tiltShift]
}).setUniforms({...yourTiltShiftArguments}); So you add the module to your model and manually use it from the shader. I believe that's the intended method, because multi-pass rendering was removed in #1278 (which seems to have been added here #715). Clearly this needs better documentation. #1460 also seems to be related. |
oh, i also do something like this. If there is no extra system designed for post-processing, it's a good try. |
I suggest to keep this opened until a maintainer like @ibgreen has commented. |
I see there is some document about effect module and some tools like txaa in the shadertools module, but it's difficult to understand how to use it. A simple example is needed.
The text was updated successfully, but these errors were encountered: