SRD Posted September 30, 2022 Share Posted September 30, 2022 vertShader:string = ` // https://github.com/pixijs/pixi.js/issues/6436 * this one!!! //pixi.js/packages/core/src/fragments/default.vert attribute vec2 aVertexPosition; attribute vec2 aTextureCoord; uniform mat3 projectionMatrix; varying vec2 vTextureCoord; void main(void) { gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 1.0, 1.0); vTextureCoord = aTextureCoord; } `; fragShader:string = ` varying vec2 vTextureCoord; uniform sampler2D uSampler; uniform sampler2D u_lut; void main(void) { vec4 pixelColor = texture2D(uSampler, vTextureCoord); gl_FragColor = texture2D(u_lut, vec2(pixelColor.r, 0.0)); } `; const filter = new PIXI.Filter(this.vertShader, this.fragShader, this.uniforms); container.filters = [filter]; Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted October 2, 2022 Share Posted October 2, 2022 Do you use alpha channel there? f so, you have to divide by alpha and then multiply ahain. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.