hi every one
i create a cube and texture it with a png file, the rendering was not expected , so what i did wrong ?
transparent texture
Moderator: Moderators
transparent texture
- Attachments
-
- Untitled.jpg (29.74 KiB) Viewed 6434 times
-
- test.zgeproj
- (10.67 KiB) Downloaded 500 times
Re: transparent texture
Hi airpas,
You can't use the DrawBackFace property of a Material for those kind of situations. Instead, you need to render the inside first and the outside after that. Either use a separate mesh for the inside, or draw the same mesh twice while toggling glFrontFace ( GL_CW for the inside, GL_CCW for the outside ).
Attached is a example using the separate mesh approach.
K
You mean the fact that you can't always see the backside / inside of the crate when looking through the transparent parts of the outside?airpas wrote:i create a cube and texture it with a png file, the rendering was not expected, so what i did wrong?
You can't use the DrawBackFace property of a Material for those kind of situations. Instead, you need to render the inside first and the outside after that. Either use a separate mesh for the inside, or draw the same mesh twice while toggling glFrontFace ( GL_CW for the inside, GL_CCW for the outside ).
Attached is a example using the separate mesh approach.
K
- Attachments
-
- Crate.zgeproj
- (11.45 KiB) Downloaded 505 times