[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] Re: WebGL spec modifications for D3D

On Jul 13, 2010, at 12:29 PM, Daniel Koch wrote:

> Hi folks,
> The problem is that there is nothing like the "invariant" keyword in D3D9 HLSL (or even D3D10 HLSL for that matter) that I am aware of.
> In practise, there must be some form of invariance guaranteed by d3d9 (especially for position), since I know of many games which use multi-pass rendering algorithms which work just fine.  The difficulty lies in figuring out exactly what is guaranteed by D3D9, since we've been unable to find any sort of public documentation or discussion of these issues.  However, even if there is position invariance, this does not provide a mechanism to toggle invariance on and off on a per-variable basis as is required in GLSL.

I think we certainly need the feature of invariance. Perhaps D3D always creates invariant shaders (it never does optimizations that would break invariance)? If so, then I suggest we keep the keyword, use it normally in OpenGL implementations (where supported) and ignore it in HLSL. Of course, I haven't investigated the issue, so I'm not sure if this is possible. But I believe we need to:

a) Make it possible to guarantee an invariant shader
b) Make it possible to enable and disable invariance in implementations that support it.


You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email: