Timeline for THREE.ShaderMaterial cannot perform antialiasing
Current License: CC BY-SA 4.0
10 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| May 8, 2020 at 16:19 | history | edited | samm | CC BY-SA 4.0 |
Update related links
|
| May 8, 2020 at 16:11 | history | edited | samm | CC BY-SA 4.0 |
Add related links
|
| May 8, 2020 at 15:53 | comment | added | samm |
As Mugen87 said: > It's important to know that the three.js material system was not designed for easy enhancements of custom shader code. Meaning you have to study the system, the respective shader chunks and their semantics so you are able to enhance a custom material with shader code from the built-in materials. There is no simple "plug and play" mechanism.
|
|
| May 8, 2020 at 15:52 | comment | added | samm | * Online example demo (code) * Material: Added onBeforeCompile() #11475 | |
| May 8, 2020 at 15:52 | comment | added | samm |
Maybe you are right. I haven't tried it in three.js, but just tried to draw 2D shapes using glsl with gl_FragCoord rather than with various THREE.Geometry after reading The Book of Shaders and 2D Distance Functions before. After posted this question, I subsequently found some other potentially useful references, but I haven't gone through them:
|
|
| May 3, 2020 at 15:32 | comment | added | DMGregory♦ | It looks like you're drawing your edge in the shader, not with the edge of your geometry. That type of edge is invisible to antialiasing techniques like MSAA, so it won't get antialiased automatically. Fortunately, you can do your own antialiasing in the shader, by replacing the sharp cutoff of the step function with something more like we'd use with a signed distance field. | |
| May 3, 2020 at 15:03 | history | edited | samm | CC BY-SA 4.0 |
Add another problem when using ShaderMaterial
|
| May 3, 2020 at 14:36 | history | edited | samm | CC BY-SA 4.0 |
update grammar
|
| May 3, 2020 at 14:36 | review | First posts | |||
| May 3, 2020 at 14:38 | |||||
| May 3, 2020 at 14:31 | history | asked | samm | CC BY-SA 4.0 |