Not exactly sure I understand what you want to achieve. But from what I understand you want the resulting color to be "blown out", i.e. go brighter than the diffuse-texture color right? Sounds like default behavior to me. I mean, the equation is diffuse light * diffuse texture. So by having a light source which is above…
I haven't started writing my own shader from scratch yet. I'm working on an expansion pack for a game that happens to need a graphical update. The graphics programmer at our company is booked solid working on another title. So we're having to make due with a programmer who's never done graphics before and myself. We're…
Alright, I'm resurrecting this thread ** casts NECRO on thread ** and calling upon you awesome peeps for some more help! I've downloaded nvidia's fx composer and am writing a shader from scratch in it. I'm quite enjoying the process so far. But now I've hit a bit of a road block. It seems that if I use: dot(Light, Normal)…
The basic theory is you take the result from the diffuse light and feed that into a texture lookup's U or V coordinate (depending on if you use a lying or standing ramp). That way, if the diffuse calculation gives a a light color, it will sample in one end of the ramp, and if it's a dark color it would sample in the other…
I did it like so(this is for one light only, but not hard to change for more): float4 Blinn( pixelIn input ) : COLOR { input.lightDir = normalize( input.lightDir ); input.viewDir = normalize( input.viewDir ); input.normal = normalize( input.normal ); float dotNormalLightDir = dot ( input.lightDir, input.normal ); float…
hrm... so I guess inside nvidia fx composer it's just that my light color wont allow me to to above 1. I'll have to add an intensity multiplier like you suggested. Thanks! However I'd still like to look into doing the diffuse calculation in an additive manner. Because my end goal is to create a shader that takes into…
You are likely working with a blinn/phong specular component. Something likespecColor= tex2d(speccolortexture, inuv);h=(cam+l)/2;spec =specColor* pow( dot(h,n), specpower); If it's something like that then the exponent (specpower) is what will control the tightness of the highlight. Values of 1 or lower will be blown out,…
On the AO thing... in the absence of SSAO I've had pretty good success simply adding a precomputed map to the ambient channel - itll react to diffuse light that way which of course it won't if you bake into the diffuse and allows you to add colour rather than just the conventional black&white. Well worth a look if you can…
Wow that smooth step really did the trick! All the info you guys have posted has been very helpful. My boss is very happy as of this morning too since yesterday our team endured the Eye of Sauron for the game's lack of graphical updates :) Despite being an older game it's starting to look closer to current gen. Thanks…