PDA

View Full Version : embm and ATI_fragment_shader



h2
08-16-2002, 04:06 AM
It is strange, but It seems impossible to implement embm without using second phase (loopback). In dx8 notation it will look like that:


ps1.4
texld r1,t1 ; offset
texcrd r0,t0 ; base map
add r0,r0,r1_bx2
phase
texld r0,r0
This shader is very slow due to loopback. Did I miss something in specs?


[This message has been edited by h2 (edited 08-16-2002).]

zeckensack
08-16-2002, 04:36 AM
That's correct. EMBM requires a dependant read, that's why you need to phase it.

It's the same thing under DX as you can see in your own example.

h2
08-16-2002, 04:59 AM
Thanks for explanation. Looks like bad news for embm http://www.opengl.org/discussion_boards/ubb/smile.gif

jwatte
08-16-2002, 01:23 PM
As EMBM is bad news in general, I don't think that's much to cry about.

With dependent reads and sufficient texture stages, you can actually do true dot3 bump mapped environment mapping. The 6 stages available on the Radeon 8500 are more than enough.

h2
08-19-2002, 02:08 AM
I don't know that's "true dot3 bump mapped environment mapping" but from the context I guess that this is a embm-with-complicated-dUdV-coord-generation. That is good in this technique (except cool name http://www.opengl.org/discussion_boards/ubb/smile.gif) if you say it is even heavier than embm?

Mezz
08-19-2002, 08:35 AM
Dot3 bumpmapping is a pretty good technique, you get per-pixel dot products between normal vectors (which are in a texture map) and your light vector. It looks nice. You should be able to find quite a few demos & tutorials on it, and it's not that difficult if you can do some maths.

-Mezz