-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WORLDVIEWINVERSETRANSPOSE #89
Comments
@RemiArnaud I don't find my notes about this :( , do you remember if we reach approval on this, and what was the decision ? |
Since this is used to transform normals, which do not use translation, I would use a 3x3. This is also what OpenGL/GLSL used when it was part of the API: For the most frictionless client-side implementation, I would like to see the type be known from the semantic. As for 2D, perhaps we can introduce new semantics, e.g., |
I don't mind what we do exactly, just that we need to be crystal clear about it. In particular, if matrices are going to have different type base on what they are applied to, then I will ask that the matrix type is backed in the name of ALL semantics. (for example: WORLDVIEW4D, WORLDVIEWINVERSETRANSPOSE3D ...) |
@RemiArnaud @pjcozzi yes we need to be consistent. So I suggest we don't create more semantics to include the type, like WORLDVIEWINVERSETRANSPOSE3 vs just WORLDVIEWINVERSETRANSPOSE There is enough possible combinations without the type already and the type will be in the parameter anyway. And as an aside, without introducing yet another "normal matrix" for WORLDVIEWINVERSETRANSPOSE, we can't just use WORLDVIEWINVERSETRANSPOSE and specify that it would be 3x3. The usage of the normal matrix is specific and specifying a type (which will be here anyway), turn this WORLDVIEWINVERSETRANSPOSE into 3x3 , i.e the way we want in generic way. |
I don't agree this is clear enough to say that the type is provided elsewhere. The application has to be prepared to handle all possible combinations of semantic and type. If I am going to only see 3x3 matrices for some semantic and 4x4 matrices for others, then I don't understand why we make the loadr check all possible combinations Also. If we go this route, we need the spec to specify exacly what the application has to do when there is a type mismatch... A lot of work for a rigourous spec, a lot o possible implementation mistakes, that we can very simply avoid |
If we cannot reach agreement about this, for further study and understanding could you propose a complete solution that covers both the 2D and 3D cases for all semantics ? |
Most engines will already have many of these semantic matrices built-in. For example, my engine has the Can't each semantic have a list of possible types in the spec, e.g., |
@pjcozzi yes, this is what I suggest. And I suggest also eventually the converter can help by forcing types for some semantics if it fits better one destination engine. We could specify indeed that some edge cases may not be vkid like FLOAT_MAT2 for projection, but WORLD could be FLOAT_MAT2 too. |
I'm not sure when this would happen. For 2D, this allows just rotation, not translation. If an app is doing something that specific, it can use a non-semantic matrix. |
@pjcozzi true. |
@pjcozzi @RemiArnaud @tparisi @RemiArnaud would this work for you ? |
Yes, exactly my point - there is only a small subset that we should allow/expose. So I don't understand why we need a separate semantic and type. The semantic name should make it really clear on its own what the type is, and the separate type information should be removed. Otherwise we need to spend time documenting all the possible combinasons, and I don't expect many developers to read the spec Even more important, a google seach for WORLDVIEWINVERSETRANSPOSE will show that it is a Mat4x4 in most cases. -----Original Message----- Most engines will already have many of these semantic matrices built-in. For example, my engine has the Can't each semantic have a list of possible types in the spec, e.g., Reply to this email directly or view it on GitHub: |
@RemiArnaud the type will be there for parameters without semantic anyway. So adding type in the semantic name would be redundant. |
"WORLDVIEWINVERSETRANSPOSE might be mat4 we can make it a mat3" That's the part I have trouble with. Why adding that level of complexity? |
Exactly the same thing for WORLD which can be mat3 or mat4. |
And it's not like if it was interexchange format, you can use a converter (even if through Rest3D) so that you could force semantic that matches your destination engine. |
Back to my original question. What are the list of valid combinations? Should the application be ready to handle all possible combinasons of types for each semantic? How is this helpful? |
It's still to be done, but we need to agree on the principle starting with WORLDVIEWINVERSETRANSPOSE and WORLD the proposal is to have then MAT3 or MAT4
No, but converters yes, so that it is easy to handle for engines.
I explained above with the example of 2D and Angry Birds.
Because having both WORLDVIEWINVERSETRANSPOSE3 and WORLDVIEWINVERSETRANSPOSE4
|
During our meeting, Remi and I agreed on the proposal of having semantic not carrying the type in its name and use the type that is on the parameter. We will have to specify for each semantic what are the supported types. The converter will have to support multiple possible type, so that the output fits well different destination engines. Consequently specification work / implementation should continue on this issue: #83 and we can close this one. |
This should be a mat4x4. But the shader in duck.json is using this as a mat3x3
what the shader really want is a 3x3 subset of this matrix, a.k.a. the NORMAL matrix.
So, either:
which one should it be?
The text was updated successfully, but these errors were encountered: