Created
December 14, 2020 00:07
-
-
Save DDR0/ed63d4cae9a66ee557cf82a37d3bd04f to your computer and use it in GitHub Desktop.
water_distort_new
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//in shaders.cfg:draw | |
set(textures, []), | |
if(liquid_textures[0], [ | |
bind_texture(liquid_textures[0], 2), | |
set(uniform_commands.u_water_tex_0, 2), | |
add(textures, [liquid_textures[0]]), | |
]), | |
if(liquid_textures[1], [ | |
bind_texture(liquid_textures[1], 3), | |
set(uniform_commands.u_water_tex_1, 3), | |
add(textures, [liquid_textures[1]]), | |
]), | |
//in shaders.cfg:fragment | |
texture2D(u_water_tex_0, loc + vec2(0.2, u_anura_cycle*u_water_tex_speed[water_index])) | |
//This does not work, returning the last texture added to textures, not the texture in slot 2 (u_water_tex_0). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment