Skip to content
Snippets Groups Projects
Commit a98f5e10 authored by Alexander Rose's avatar Alexander Rose
Browse files

fix fxaa antialiasing

- was broken when used with other postprocessing effects
- expose texture.filter
parent e5cf97d1
No related branches found
No related tags found
No related merge requests found
......@@ -306,7 +306,8 @@ export class PostprocessingPass {
this.nSamples = 1;
this.blurKernelSize = 1;
this.target = webgl.createRenderTarget(width, height, false, 'uint8', 'nearest');
// needs to be linear for anti-aliasing pass
this.target = webgl.createRenderTarget(width, height, false, 'uint8', 'linear');
this.outlinesTarget = webgl.createRenderTarget(width, height, false);
this.outlinesRenderable = getOutlinesRenderable(webgl, depthTexture);
......
......@@ -186,6 +186,7 @@ export interface Texture {
readonly format: number
readonly internalFormat: number
readonly type: number
readonly filter: number
getWidth: () => number
getHeight: () => number
......@@ -326,6 +327,7 @@ export function createTexture(gl: GLRenderingContext, extensions: WebGLExtension
format,
internalFormat,
type,
filter,
getWidth: () => width,
getHeight: () => height,
......@@ -415,6 +417,7 @@ export function createNullTexture(gl?: GLRenderingContext): Texture {
format: 0,
internalFormat: 0,
type: 0,
filter: 0,
getWidth: () => 0,
getHeight: () => 0,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment