question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[v4] Intent Clarification: Filter vs Shader

See original GitHub issue

Looking through the examples and issues, I see lots of demos for filters - but few for shaders.

What is the Pixi intended paradigm for when to use a filter vs a shader? For example, when is it recommended or appropriate to use Sprite.filters = [myFilter] vs Sprite.shader = myShader?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
ivanpopelyshevcommented, Feb 26, 2017

I don’t know what paradygm was used in the start.

How i see it:

Shader is for mass sprites/meshes. Shader calls are batched, streamed. 1000 elements with a shader are ok. Filter is applied to one big sprite/container to make it look cool. 1000 sprites with Filter will destroy your performance.

  1. Filter must be applied to region of texture, and not full texture, (mapCoord,unmapCoord) is required if its not pixel-to-pixel shader.
  2. Filter must use filterClamp, otherwise there’ll be problems
  3. It may have two inputs - the “background” and “sprite” that it applies on it.
0reactions
lock[bot]commented, Feb 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[v4] Intent Clarification: Filter vs Shader · Issue #3788 - GitHub
Shader is for mass sprites/meshes. Shader calls are batched, streamed. 1000 elements with a shader are ok. Filter is applied to one big...
Read more >
Intent to Implement: CSS Custom Filters (aka CSS Shaders)
CSS Custom Filters enable filter effects on DOM elements using custom authored WebGL (GLSL) shaders. Authors can pass in custom parameters from CSS...
Read more >
Shader - Wikipedia
In computer graphics, a shader is a computer program that calculates the appropriate levels of light, darkness, and color during the rendering of...
Read more >
WebGL - How do I apply post processing filters to fragment ...
The source of the problem starts with me trying to apply a "glow" or a "halo" effect to whatever is outputted by the...
Read more >
Direct3D 11.3 Functional Specification - Microsoft Open Source
Outputs are one or more 4-vectors of output data for the current pixel or sample, ... These Pixel Shader derivative calculations, used in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found