LoL this makes me mad. I dont know if it is this hlsl compiler or max but it is crazy. I've put my code into some fancy functions like Xoliul did, to get a better overview. But instead working like before as I would expect it, it does not I've got no compile errors or anything else, but my specular calculation doesn't work…
Thanks for the detailed response, again :) I have a much better idea of where shaders are fitting into the overall pipeline. Also good to know of the scope that I will be learning. That is a great list of shaders to try and create too, I shall definitely be using something along those lines for "further learning" (once I…
I've now added normalmap,glossmap-support and light attenuation to my shader, and fixed some errors. Its still not the prettiest, but I think I've learned enough to move further. I can post my shader here, if anyone is interested ? I'm now learning cubemaps and how to use them for reflection/refractions. And I'm stuck…
I just tried changing the byte notation to 0x003 and the shader seems to mess up. If it is 0x002 then it just displays the sphere with a solid colour, but here is what happens with 0x003 it also seems to be a kind of plane as you can rotate it and move it about. Any ideas why this is happening? I also completed the next…
@JackyBoy this In.position etc. is C syntax, search for "structs in C" and you will find enough tutorials about this topic. @dnc Sadly that ShaderFx version expires, so I couldn't worked any longer on that shader. Instead I'm learning hlsl now with notepad from scratch. It goes quite well. I've written a simple diffuse…
Hey all, trying to get Spec and gloss working now. I have my gloss in the aplpha of my spec channel. They look like this: But it seems that my specular is always getting blown out. Here it is with the gloss spinner at 100: And here it is at 0: Here is my code: string ParamID = "0x003";float4x4 wvp : WORLDVIEWPROJ < string…
Well, I just carried on plugging away and I have managed to get the spec working correctly, looks pretty much identical to XoliulShader (my benchmark to see if things are working correctly :p ) I was multiplying and powering by the wrong things, I was trying to figure it out just form the Xoliul source, but it is a bit…
Hey jacky. I see some weirdness: float4 light = saturate(dot(N,L)); float4 Diffuse = ColorTexture * light; a dot product always returns a single float, not a vector. So what happens when you put this into a float 4, is that every component (r, g, b and a) get assigned this value. It will look grey scale with that same grey…
Sorry, I can't help with your question dnc, hopefully one of the others will be able to. I have started following the Eat3D CGFX tutorial DVD and have finally got around to making my fist shader! I have created it in notepad++ C# sytax highlighting seemed to be the best. Unless anyone else has any better suggestions? I…
dnc: i think that's an application thing, the transparency draw order. Shaders allow you to decide HOW your model is rendered, but not in what order. The application needs to have proper support for transparency in its draw order, but that's often not the case in DCC apps like Max or Maya. I'm a bit confused why you think…