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

Re: [Public WebGL] Weird shader compiler error - casting a mat4 into a mat3.



It is. From section 5.4.2:

If a matrix is constructed from a matrix, then each component (column
i,row j) in the result that has a corresponding component (column
i,row j) in the argument will be initialized from there. All other
components will be initialized to the identity matrix. If a matrix
argument is given to a matrix constructor, it is an error to have any
other arguments.

On Tue, Mar 15, 2011 at 1:34 PM, Oliver Hunt <oliver@apple.com> wrote:
> Couldn't ANGLE just emit its own constructor where appropriate?
> mat4 foo = mat4FromMat3(mat3);
>
> Is the mat4(mat3) constructor defined as part of GLES2.0's shader language?
>  If it isn't then an implementation (such as ANGLE) should be explicitly
> disallowing it on all platforms.  If it is defined as part of the spec then
> an implementation must ensure that it will work regardless of the backend.
>  If it's not part of the GLSL ES spec, then we would be extending the
> language, and so need to define that extension, but i'm fairly sure we don't
> want to do anything like that.
> Also try to recall that ANGLE is simply one (popular) validation tool used
> by WebGL implementations, so it can't just be arbitrarily extended beyond
> what the specifications allows.
> --Oliver
>
>
>
>
>>
>> -Ken
>>
>> -----------------------------------------------------------
>> 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:
>> unsubscribe public_webgl
>> -----------------------------------------------------------
>>
>
>
>

-----------------------------------------------------------
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:
unsubscribe public_webgl
-----------------------------------------------------------