Jump to content

opengl style sprite shader in vex


Recommended Posts


in opengl there are different blending modes for combining shaded fragments with the current color of the framebuffer. Different ways of blending functions are supported one of them being

source_color*source_alpha + destination_color*(1.0-source_alpha)

source_color and source_alpha is the color and alpha value of the fragment which is about to be written to the framebuffer. Think of it as the rgba value of a texture on some rendered geometry. destination_color is the current color in the framebuffer.

My question is: is it possible to model this behaviour in vex somehow? Want I want to achieve is to scatter some grids and apply some texture with an alpha channel to them without any lighting etc. pretty basic stuff. I dont want to use sprites. I have been trying hard to get this stuff working with decal material but if I have more grids the blended result becomes brighter (http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=2402). I have been looking at this thread http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=10406 but they use sprites and a layered surface shader which for some reason I can not create in houdini11(apprentice). I found another thread where the topic creator wants to do exactly the same as I want: http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=13342. There people suggest to use the glass shader. I tried to play with it but I couldn't get it to do what I want (actually I couldn't get it do do anything). Also I think it is a bit overkill for the simple thing I am trying to do.

Thanks for any feedback in advance,


P.S.: in case its not obvious from my question: I'm a noob

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...