embm and ATI_fragment_shader

It is strange, but It seems impossible to implement embm without using second phase (loopback). In dx8 notation it will look like that:

texld r1,t1      ; offset
texcrd r0,t0     ; base map
add r0,r0,r1_bx2
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).]

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.

Thanks for explanation. Looks like bad news for embm

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.

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 ) if you say it is even heavier than embm?

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.