Simple HLSL question

Started by
1 comment, last by rjackets 18 years, 5 months ago
Hi, Can someone please provide a simple example/link to a HLSL that replicates these fixed function pipeline settings. Basically, I want to render a textured triangle and enable vertex alpha blending along with lighting. Pushing this into a shader I suspect I need three elements, Light source, vertex diffuse and texture coordinates? The examples I've seen so far don't cover all three and I'm getting a little lost. Any pointers would be gratefully appreciated. BTW, Shader version is 2. Many thanks,
Advertisement
I'd recommend FX Composer by NVidia, if you want to get into HLSL shaders. When you create a new shader, it will automagically create a basic shader to start from, which includes directional lighting (I think), specular, and texturing. This is a great place to start from, if you want to learn.

It also contains many useful samples when you're ready to move on.
Sirob Yes.» - status: Work-O-Rama.
The post above is a great place to start. It's where I began. ATI's rendermokey is also a good tool. However, Rendermonkey will export to HLSL but it uses a proprietary format in its design. nVidia Composer is more intuitive. Keep in mind though, both these IDEs have features that they use that you're engine will not have by default. In particular, render targets can be tricky. My best advice is to learn about simple shaders, and then make a very basic program yourself and use that to work with your shader scripts. That way you know exactly what you're getting and how to implement it.

This topic is closed to new replies.

Advertisement