Scroll Texture on 3D Model?
Moderators: GZDoom Developers, Raze Developers
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
-
- Posts: 1318
- Joined: Tue Dec 06, 2016 11:25 am
Re: Scroll Texture on 3D Model?
Yes, by assigning a shader to the texture which changes the uv values via timer.
-
- Posts: 56
- Joined: Thu Jan 28, 2021 1:45 am
Re: Scroll Texture on 3D Model?
I'm 5'-10". Every bit of that went over my head.
-
- Posts: 1556
- Joined: Tue Oct 20, 2015 12:50 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Kozolupy, Bohemia
-
- Posts: 56
- Joined: Thu Jan 28, 2021 1:45 am
Re: Scroll Texture on 3D Model?
I pieced together a shader from many sources.
SHADER = 3dscroll.fp
It works if the texture is just a single texture file. But I originally had my 3D Model with material texture textures/BACTRIA6.png: (also in GLDEFS) It doesn't work with
Anyone know why it won't work with the diffuse/normal/specular texture but will with just a diffuse text? What needs to change? Single texture comes out darker and no shine. DNS texture has a nice "wet look" to it that I want.
I tried putting quotations on the texture in case the long path name was needed, didn't help.
SHADER = 3dscroll.fp
Code: Select all
//3D Model UV animation shader
uniform float timer;
vec4 Process(vec4 color)
{
vec2 uv = vec2(gl_TexCoord[0].s, gl_TexCoord[0].t + (timer*0.0625));
return getTexel(uv);
}
In GLDEFS I call out the SHADER:
HardwareShader "textures/bactria6.png"
{
Shader "shaders/3dscroll.fp"
Speed 1.0
}
Code: Select all
material texture textures/BACTRIA6.png
{
normal normal/BACTRIA6n.png
specular specular/BACTRIA6s.png
specularlevel 1
glossiness 4
}
I tried putting quotations on the texture in case the long path name was needed, didn't help.
Code: Select all
material texture "textures/BACTRIA6.png"