Welcome Guest [Log In] [Register]
We hope you enjoy your visit.


You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.

Join our community!

If you are already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Scrolling Texture.
Topic Started: Sep 15 2007, 01:59 AM (445 Views)
Zedman3d
Member Avatar
Forum God
[ *  *  *  *  *  * ]
How do i make a texture scroll across a model?
Quote:
 
Eanbro: My problem with C++ is that not everything is included to start making projects with it.
Quote:
 
Dr.B: Your problem with C++ is that you want it to be like Game Maker...
Offline Profile Quote Post Goto Top
 
LaserLemon
Member Avatar
Sir
[ *  *  *  *  *  * ]
I don't think there's compatibility for that yet...
Posted Image

Formerly known as FaTaL_N00B.
Offline Profile Quote Post Goto Top
 
Dr. Best
Member Avatar
Administrator
[ *  *  *  *  *  * ]
That can be done easily through a simple vertex shader. I've once posted one in the game graphics section, that does exactly this, but I can't find it ATM. So here's a rewritten version of it ^_^ .
*.ufx file:
Code:
 
Ultimate3DEffectFile 1.1

VertexShaderFile effects/TheShaderFileIPostedBelow.vsh

VSConstant 0 VS_CONST_WORLD_VIEW_PROJ_TRANS_1
VSConstant 1 VS_CONST_WORLD_VIEW_PROJ_TRANS_2
VSConstant 2 VS_CONST_WORLD_VIEW_PROJ_TRANS_3
VSConstant 3 VS_CONST_WORLD_VIEW_PROJ_TRANS_4

VSConstant 4 VS_CONST_MAT_DIFFUSE

VSConstant 5 VS_CONST_CURRENT_TIME

// This constant defines the texture scrolling speed and the direction
VSConstant 6 VS_CONST_MANUAL_SETTABLE 0.05 0.05 0 1


*.vsh file:
Code:
 
vs.1.1

m4x4 oPos, v0, c0

mov oD0, c4

mov r0, c4
mad oT0, c6, r0.x, v7


Probably there's a typo in it somewhere. Just let me know if so.
Offline Profile Quote Post Goto Top
 
Zedman3d
Member Avatar
Forum God
[ *  *  *  *  *  * ]
Dam it. I wanted to keep anything needing a pixel shader out for the basic things for max compatibility.... o well.
Quote:
 
Eanbro: My problem with C++ is that not everything is included to start making projects with it.
Quote:
 
Dr.B: Your problem with C++ is that you want it to be like Game Maker...
Offline Profile Quote Post Goto Top
 
Dr. Best
Member Avatar
Administrator
[ *  *  *  *  *  * ]
This does not need a pixel shader, it needs exceptionally a vertex shader and for that reason it is supported on absolutely every PC that supports Ultimate 3D ;) .
Offline Profile Quote Post Goto Top
 
skarik
Member Avatar
kitten eating scum
[ *  *  *  *  *  * ]
Can't you do it using the model modifying functions? That's how I was planning to do the fading clouds in my game.
Blog|EHS
Offline Profile Quote Post Goto Top
 
Dr. Best
Member Avatar
Administrator
[ *  *  *  *  *  * ]
Yes, you can, but the use of the above vertex shader is a lot more efficient.
Offline Profile Quote Post Goto Top
 
harkathmaker
Member Avatar
Persistent Enquirer
[ *  *  *  *  * ]
Quote:
 
This does not need a pixel shader, it needs exceptionally a vertex shader and for that reason it is supported on absolutely every PC that supports Ultimate 3D  ;) .


So only pixel shaders are possibly incompatible? That makes me happy :cow:
Offline Profile Quote Post Goto Top
 
« Previous Topic · Questions about Ultimate 3D · Next Topic »
Add Reply