- Home /
Fluid Shader
Hi. How i can create shader for android/ios that do something like that: BACKGROUND - image behind the plane plane with shader in foreground
(pseudocode)
if( BACKGROUND[x,y].COLOR.R > 0.5f )
{
plane_texture[x,y].color.R = 1.0f
}
something like threshold
Answer by ScroodgeM · Jul 14, 2012 at 09:16 AM
this "pseudocode" effect will look similar like particles additive shader at front of any BG image.
[x,y] - are values the same for textures? what plane_texture contains before "pseudocode"? has it alpha?
explain the question if you need a good answer
Answer by RevenantX · Jul 16, 2012 at 11:20 AM
x, y - coordinates of current pixel. plane_texture - material without texture, only with shader. If needed empty texture with alpha only. I want to achieve something like this:
all you need is an additive shader and a brush texture - then just generate small planes with this texture and you'll got what you want
I am using particles for render. With additive shader it looks ugly - http://rghost.ru/39239743.view
make texture with brush lighter - so that 5x-10x overlapping will not overburn colors
make edges for brush more smooth
I created lighter and smoother texture. But lighter texture - gives more overburned colors. I want to create water effect with fluids. Like this http://rghost.ru/39241455.view
sorry i mean 'light' is 'low' - so really this texture must be dark. for additive this is what you need
Your answer
Follow this Question
Related Questions
Set default number/emails in a new text message/email sent via unity 0 Answers
Unity5 standard shader can be used on mobile devices? 1 Answer
Transparency working in the editor but not when I build 0 Answers
Store/Stack Items 0 Answers
Why is shader behavior different between Android and iOS? 1 Answer