How to port Shadertoy multipass GLSL shader
Hi, I'm trying to port these Shadertoy fragment shaders to Processing using PShader: https://www.shadertoy.com/view/XsG3z1# I'm not sure I understood how to correctly do the multipass. Here's my...
View Articletranslate tutorial.
hey! does anybody help me to understand shaders better? Im reading all tutorials that i found, includes PShader reference processing page. For now, im trying to pass the data of vertex into a glsl...
View ArticletexCoord problem
hello! its me again. im in a hardest process of learning GLSL. As i can see, exist many types of sintaxis and versions for writing a shader program and its a little bit confuse writing a shader for...
View ArticleGLSL and video Texture
hello everyone. Im trying to pass a video as a texture into a fragment shader. but the sketch crash when i run it. here is the code: import processing.video.*; import peasy.*; import...
View ArticleNeed example code for texture shader
Hi. I trying to draw texture on shader, but its not work. What I do wrong? bg drawn correct. PShader mShader; PImage bg; PImage tex; void setup() { size(640, 360, P2D); noStroke(); textureMode(NORMAL);...
View ArticleSome ShaderToy shaders converted from Processing
Hi all Sharing some of the shaders I have converted from ShaderToy to work with Processing 3... Will be adding more as I do them. Currently there is: - 3 types of VHS effect - Glitch - Sobel edge...
View Articletransformation using glsl shaders
i need to implement transformation on a 3d object like a cube using glsl shader and i am unable to firgure out how to do it. Can anyone guide me please as i m new to glsl shaders?
View ArticleVertex of shapes in shader
I wonder why the vertexes for shapes that was drawn direct on the sketch instead of creating an PShape, sends other vertexes to the shader then the one that was drawn on a PShape. For example, when I...
View ArticlePGraphics and PeasyCam
hi! im trying to do a multipass shader effect. the problem is that peasyCam dont apply the transformations in the buffer. PShader sh; PShader sha; PGraphics buffer; PGraphics buffer2; import...
View ArticleFlat shading for 3D objects?
Is there a way to disable the nice smooth shading in P3D sketches? For example, to look like this: When making files for 3D printing, I find it's nice to have just flat shading, so you can see all the...
View ArticleTrouble setting uniforms for PShaders used by secondary renderers
I'm trying to do some low-level OpenGL rendering onto a separate PGraphics buffer for a library I'm rewriting, and I've run into an issue where I can get my geometry to render on the separate PGraphics...
View ArticleHow do use a sampler2d array in Processing?
I would like to keep a frame buffer in the shader (say, the last 1 second of video). To do that I tried with uniform sampler2D tex[30]; and from Processing sometimes I try writing into that array with...
View ArticleSetting projection and modelview matrices manually
Hi. I'd like to copy the projection and modelView matrices from one PGraphics into another one so I can render different passes of the same scene no matter what camera library is in use. I have tried...
View ArticleRender depth buffer onto 2d PGraphics
I would like to use the depth buffer of a PGraphics3D in a texture shader on a PGraphics2D. Now I could not really find a way to share the depth buffer of the 3d scene with the 2d texture, so I decided...
View ArticleGet pixel values and displace the vertex?
I want to write GLSL shaders that use the pixel values of the image as magnitude in order to displace the vertices of an object in the direction of the surface normal. Incorporate a point light and...
View ArticleHow to port this shader to Processing 3?
Shader in question: https://shaderfrog.com/app/view/1078?view=shader I'm a complete GLSL noob and was wondering how to go about applying this shader to an imported .obj in Processing. My sketch is...
View ArticleDraw points from texture stored locations?
I want to pass a shader a texture of encoded locations, and have it draw points at the decoded locations. I have a particle system stored in a texture that's 3000x1, with the x and y locations encoded...
View ArticleAre Processing's shaders fast enough?
It's said that OpenFrameworks runs much faster than Processing, so many artists choose OF in live performances other than Processing. But I just wonder how fast it is to use Processing's shaders...
View ArticleImplementing a gooey effect with a shader
I'm trying to replicate a web design trick know as "gooey effect" (see it live here). It's a technique applying SVG filters on moving ellipses in order to get a blob-like motion. The process is rather...
View ArticleReaction-Diffusion using GLSL works different from normal
I managed to get Reaction Diffusion Algorithm to run on the GPU, but now I'm having problems. The code runs and all, but the effect is much different from the effect I get with Reaction Diffusion...
View ArticleHow to port shaders from shaderfog, shadertoy to Processing?
As a very confused opengl beginner complete beginner who is struggling to get started I have a few questions. Is it possible to use GLSL directly in processing or do you need to port to PShader? Is...
View ArticleShadertoy shader not rendering until screen window is resized if...
I'm trying to figure out DwShadertoy's implementation of Shadertoy shaders, however there are two big issues I've ran into. The first is that the window won't render until it is resized when...
View ArticleHow to implement a z-buffer within a blur fragment shader
Hi all, I'm trying to fake a Depth of Field effect in a 3D scene. More specifically, I would like to use a z-buffer (depth buffering) to adjust the level of blur of a an object based on its distance...
View ArticleNVidia/AMD differences?
I made a tower defense game for a game jam in processing3 https://indielm.itch.io/sap42 The path finding for enemies is all done in a shader on the gpu. I don't have access to an AMD machine, but I'm...
View Articlehow to combine shadows + reflections in frag shader?
To put it as simply as possible, I'm modifying and recompiling PixelFlow's render.frag and render.vert files to allow me to add cubemap-based reflections to PixelFlow's skylight renderering system....
View ArticleUse samplerCube and sampler2D in a single glsl Shader
How can I use a samplerCube and sampler2D in a single glsl Shader ? I get the following error when I try to use both at the same time : Cannot validate shader program:Validation Failed: Sampler error:...
View ArticleCodingTrain Fire&Water
TheCodingTrain channel did two videos recently on water and fire effects. He did them in just processing, I'm doing it in processing with shaders. For the water, I didn't have any issues converting it...
View ArticleSend individual msj to a shader
hey everybody. this time ive a problem sending invididual mensajes to a fragment shader. Ive an array of spheres, and i want that every sphere have a different size of blur, witch is a uniform of the...
View ArticleHow to combine a point shader with a blur shader?
I would like to display thousands of points on a 3D canvas with a Depth of Field effect. More specifically, I would like to use a z-buffer (depth buffering) to adjust the level of blur of a point based...
View Articlereal time data program
hey guys. in this time i need some help to optimize a system to pick shaders in real time (fragment shaders, and vertex shaders). This code is a mix that i recoleted in internet with code writing by...
View Article