Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Ayumi, alibaba), 704 guests, and 11 spiders.
Key: Admin, Global Mod, Mod
Newest Members
lorikob361, LucasJoshua, Baklazhan, Hanky27, firatv
19054 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: How do i texture terrain using the vertex normal? [Re: Superku] #411240
11/14/12 18:27
11/14/12 18:27
Joined: Aug 2005
Posts: 238
Caermundh Offline OP
Member
Caermundh  Offline OP
Member

Joined: Aug 2005
Posts: 238
It doesnt matter what I change fac to. If fac is less than about .75, i get rock everywhere, if its greater than about 2, i get grass everywhere. If its between those values, i get varying blend strengths of grass and rock, but regaurdless of the strength, i still have grass halfway up the walls.

I need something more than Input.InNormal.y - this alone is obviously not enough information for the shader to correctly determine the normal of a given pixel. Its very close, but not quite.

The problem seems to lie with the border vertexes. Those vertex that are right where the geometry goes from mostly horizontal to mostly vertical. Its like the normal information for these is being returned incorrectly, or maybe my shader isnt reading it correctly.

Maybe i need to pass the normal from the vertex shader to the pixel shader as a COLOR instead of a TEXCOORD? I read in a couple places that people who were having problems getting a shader to work properly were able to fix the problem by changing the semantic of some one variable or other.

What other ways are there for there to be a disconnect between the reported normal in the shader and the visual normal on the screen?

Re: How do i texture terrain using the vertex normal? [Re: Caermundh] #411242
11/14/12 19:02
11/14/12 19:02
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
As you obviously didn't care to test my suggestion, I didn't read the rest of your post, sorry.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Page 2 of 2 1 2

Moderated by  Blink, Hummel, Superku 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1