Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (1 invisible), 672 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 4
Page 9 of 14 1 2 7 8 9 10 11 13 14
Re: Bump Mapping Shader [Re: MASTERJUNOJET] #22220
02/12/05 23:03
02/12/05 23:03
Joined: Oct 2002
Posts: 815
NY USA
R
Red Ocktober Offline
Developer
Red Ocktober  Offline
Developer
R

Joined: Oct 2002
Posts: 815
NY USA
MJ... open up the shader code and look for a line in the first pass vertex shader function that looks like this...

float LightRange = 0.00some value;

try changing it to float LightRange = 0.00001;

i think this line determines the light falloff... and it may be a set a lil
high, causing the light to drop off before it reaches your normalmapped object.

also, make sure that the no fog property is set... and that you have a light emiiter object...

i hope this is of some help... i'm not the expert on this... just passing on
some stuff i struggled with that might not be so obvious...

good luck

--Mike

Re: Bump Mapping Shader [Re: Red Ocktober] #22221
02/14/05 13:09
02/14/05 13:09
Joined: May 2004
Posts: 157
Earth, for the moment
MASTERJUNOJET Offline
Member
MASTERJUNOJET  Offline
Member

Joined: May 2004
Posts: 157
Earth, for the moment
I cant find that line in this bump map code, am I looking in the right code?


Projects: Jet Force Gemini 2
Re: Bump Mapping Shader [Re: MASTERJUNOJET] #22222
02/14/05 23:16
02/14/05 23:16
Joined: Oct 2002
Posts: 815
NY USA
R
Red Ocktober Offline
Developer
Red Ocktober  Offline
Developer
R

Joined: Oct 2002
Posts: 815
NY USA
open the .fx file up in SED and look around line 74... in a section of code that looks like this...


Out.Tex=texcoord0.xy;
float3 PosWorld=mul(Pos,matWorld);
[u]float3 LightRange= 0.004;[/u]


simply do a text search for LightRange...

we are talking about the pix hsader 2.0 version of the ent bumpmapping code from the ultimate shader thread... aren't we...

--Mike

Re: Bump Mapping Shader [Re: Red Ocktober] #22223
02/15/05 12:02
02/15/05 12:02
Joined: May 2004
Posts: 157
Earth, for the moment
MASTERJUNOJET Offline
Member
MASTERJUNOJET  Offline
Member

Joined: May 2004
Posts: 157
Earth, for the moment
Oh I was looking at a different code, could you perhaps give me a link to the one your talking about please?


Projects: Jet Force Gemini 2
Re: Bump Mapping Shader [Re: MASTERJUNOJET] #22224
02/15/05 23:19
02/15/05 23:19
Joined: Oct 2002
Posts: 815
NY USA
R
Red Ocktober Offline
Developer
Red Ocktober  Offline
Developer
R

Joined: Oct 2002
Posts: 815
NY USA
sure... Matt's code is in the first post of this thread
Ultimate Shader Thread

go there and use your browser's edit/find on this page menu option to find the third oocurance of LightRange.

that thread has about all you need to implement the dx9c shaders... and this is where you'll find the code for entity as well as level geometry bump mapping implementation...

good luck

--Mike

Re: Bump Mapping Shader [Re: Red Ocktober] #22225
02/17/05 13:28
02/17/05 13:28
Joined: May 2004
Posts: 157
Earth, for the moment
MASTERJUNOJET Offline
Member
MASTERJUNOJET  Offline
Member

Joined: May 2004
Posts: 157
Earth, for the moment
Thanks for all your help, I finally found it, didnt fix the dark problem though

Here is what I keep getting:





As you can see the lit areas look pretty good, so all that I need is to fix the dark.


Projects: Jet Force Gemini 2
Re: Bump Mapping Shader [Re: MASTERJUNOJET] #22226
02/28/05 05:29
02/28/05 05:29
Joined: Mar 2002
Posts: 7,726
old_bill Offline
Senior Expert
old_bill  Offline
Senior Expert

Joined: Mar 2002
Posts: 7,726
Has anyone converted this line to DX9:

Code:
VertexShaderConstant[18]={1f,1f,1f,1f};


because i get a crash there:

Malfunction W1550: Error in effect:
mat_bumpmap(28): error X3000: syntax error: unexpected token 'f'

> VertexShaderConstant[18]={1f,1f,1f,1f}; <

Thanks for any help!

old_bill


Success is walking from failure to failure with no loss of enthusiasm.
Re: Bump Mapping Shader [Re: old_bill] #22227
02/28/05 05:40
02/28/05 05:40
Joined: Mar 2001
Posts: 3,298
Beverly, Massachusetts
Rhuarc Offline
Expert
Rhuarc  Offline
Expert

Joined: Mar 2001
Posts: 3,298
Beverly, Massachusetts
With Dx9, the f suffix is only valid on floating point numbers (to my knowledge).

Try this:
VertexShaderConstant[18]={1.0f,1.0f,1.0f,1.0f};


-Rhuarc


I no longer post on these forums, keep in touch with me via:
Linkedin.com
My MSDN blog
Re: Bump Mapping Shader [Re: Rhuarc] #22228
02/28/05 05:57
02/28/05 05:57
Joined: Mar 2002
Posts: 7,726
old_bill Offline
Senior Expert
old_bill  Offline
Senior Expert

Joined: Mar 2002
Posts: 7,726
Fixed that problem, now the next error appears:

Quote:


Malfunction W1550: Error in effect:
mat_bumpmap(47): error X5326: Read of uninitialized components(*) in v0: *x/0 *y/1 *z/2 *w/3
(48): error X5326: Read of uninitialized components(*) in v0: *x/0 *y/1 *z/2 *w/3
(49): error X5326: Read of uninitialized components(*) in v3: *x/0 *y/1 *z/2 w/3
(50): error X5326: Read of uninitialized components(*) in v7: *x/0 *y/1 *z/2 *w/3
(51): error X5326: Read of uninitialized components(*) in v7: *x/0 *y/1 *z/2 *w/3
(52): error X5326: Read of uninitialized components(*) in v7: *x/0 *y/1 *z/




Thanks
old_bill


Success is walking from failure to failure with no loss of enthusiasm.
Re: Bump Mapping Shader [Re: old_bill] #22229
02/28/05 06:09
02/28/05 06:09
Joined: Mar 2001
Posts: 3,298
Beverly, Massachusetts
Rhuarc Offline
Expert
Rhuarc  Offline
Expert

Joined: Mar 2001
Posts: 3,298
Beverly, Massachusetts
From the manual:
Quote:

Note that DX8 vertex shaders require a small modification for running
under DirectX 9. The following declaration:
decl
{
stream 0;
float v0[3]; //position
float v3[3]; //normal
float v7[3]; //uv 1
float v8[3]; //uv 2
}
has to be replaced by a DX9 declaration:
dcl_position v0
dcl_normal v3
dcl_texcoord0 v7
dcl_texcoord1 v8





-Rhuarc


I no longer post on these forums, keep in touch with me via:
Linkedin.com
My MSDN blog
Page 9 of 14 1 2 7 8 9 10 11 13 14

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