質問

Is it possible in AGAL in fragment shader get current fragment depth if any?

役に立ちましたか?

解決

No, I'm afraid there is no way to read from the depth buffer in AGAL.

You can however do a workaround by rendering a depthmap first into a texture, and then using it (which may be enought, depending on the effect you are trying to implement).

In fact, even rendering a depth map with good precision can be (a little) tricky, because there are no float32 textures in flash, so the depth as to be stored in a R8G8B8A8 texture (by packing and unpackings values on the GPU).

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top