Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

HLSL Shaders

Name: Anonymous 2007-08-30 11:56 ID:VUkDdlhQ

LOL shaders wtf.

I cant manipulate my texture coords properly.
float2 UV0 : TEXCOORD0;
float2 changedUV = (UV0.x - Scrollu,UV0.y - Scrollv);
Col = tex2D(g_DiffuseSampler, changedUV );                   
fairly strightforward, but not.
So..... basics time. what does TEXCOORD0 pass into 'UV0'

Name: Anonymous 2007-08-30 12:26 ID:VUkDdlhQ

Half hour bump!

Name: Anonymous 2007-08-30 13:04 ID:VUkDdlhQ

hour bump

Name: Anonymous 2007-08-30 13:23 ID:rqK8WY0m

>>2 Win.
>>3 Fail.
>>1-3 Samefag regardless.

Name: Anonymous 2007-08-30 13:30 ID:Heaven

One and a half hour sage.

Name: Anonymous 2007-08-30 14:17 ID:rnKkGRm6

Hmm... Maybe


(define UV0 TEXCOORD0)
(define changedUV (list (- (prop UV0 x) Scrollu) (- (prop UV0 y) Scrollv)))
(set! Col (tex2D g_DiffuseSampler changedUV))


?

Name: Anonymous 2007-08-30 14:55 ID:Heaven

Read SICP

Name: Anonymous 2007-08-31 5:30 ID:lW0fudmo

>>4
Wow genius, but yeah, i forgot around the hour mark.
>>6
Nice try, but that isnt the syntax.
>>7
Looks somwhat outdated for my purpose dontcha think anon?

Name: Anonymous 2007-08-31 5:32 ID:Heaven

>>8
Looks somwhat outdated for my purpose dontcha think anon?

No.

Name: Anonymous 2007-08-31 5:55 ID:lW0fudmo

>>9
"....Structure and Interpretation of Computer Programs (SICP) is a textbook published in 1985......"

HLSL (direct X) in use today, and for only some years...

Name: Anonymous 2007-08-31 5:58 ID:kg8QnQuQ

What is your problem, you don't mention your problem?
What is the texcoord? A 2d coordinate.

Name: Anonymous 2007-08-31 6:00 ID:kg8QnQuQ

>>11 cont.

A 2d coordinate which has been created from interpolating between the texture coordinates set at the vertices of the triangle.

Name: Anonymous 2007-08-31 6:01 ID:kg8QnQuQ

If all you are trying to do is make a texture scroll you don't even need to use shaders, you can just do a matrix texture transform using the fixed function pipeline.

Name: Anonymous 2007-08-31 6:25 ID:lW0fudmo

>>12
exactly, so how come i cant access each  element and apply some change to it

why doesnt (UV0[0],UV0[1]) = UV0


>>13
zomg words.
Please consider ive been doing this for less than 48 hours

Name: Anonymous 2007-08-31 6:29 ID:kg8QnQuQ

oh. try
float2 changedUV = float2(UV0.x - Scrollu,UV0.y - Scrollv);
or
float 2 changedUV = { UV0.x - Scrollu,UV0.y - Scrollv };

Name: Anonymous 2007-08-31 6:34 ID:lW0fudmo

aaaaah.
yes, option 1.
Thx much anon

Name: Anonymous 2007-08-31 8:39 ID:MERvZJzk

(define changedUV (float2 (- (prop UV0 x) Scrollu) (- (prop UV0 y) Scrollv)))

Name: Anonymous 2009-03-06 7:32

The 80 students dropped   and became business   majors only one   relevant post Suck.

Name: Anonymous 2010-12-23 3:27

Name: Anonymous 2013-07-30 18:10

Lain

Name: Anonymous 2013-07-30 20:24

check 'em!

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List