Jump to content

[1.7.10] [SOLVED] Turn off Backface Culling?


Recommended Posts

Posted

I've been searching for a while on it, but I'd like to turn off backface culling for certain blocks. In other words: draw all faces, including the back ones (it concerns a transparent block).

Is there an easy way to override this behavior?

If anyone has a comprehensive, visual guide to GUIs - don't hesitate to message me. They make my head spin.

Posted

I meant drawing the back faces of the transparent block. I have no issue (right now) with blocks below/behind it being rendered. Thanks though.

If anyone has a comprehensive, visual guide to GUIs - don't hesitate to message me. They make my head spin.

Posted

Just a default block with custom textures, in render pass 1 if it matters at all.

If anyone has a comprehensive, visual guide to GUIs - don't hesitate to message me. They make my head spin.

Posted

Minecraft "cube" rendering system has no notion of back faces. It is simply six single-sided quads.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Hmmmm okay. Then probably the better question would be how I could also render the INSIDE of these quads?

If anyone has a comprehensive, visual guide to GUIs - don't hesitate to message me. They make my head spin.

Posted

Use the tessellator and do it manually, it's not that hard.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

If I agreed with you, I wouldn't have been asking the question for two days now.

But I'll take another crack at it after work.

If anyone has a comprehensive, visual guide to GUIs - don't hesitate to message me. They make my head spin.

Posted

SOLVED!

 

RenderBlocks has a method called setRenderFromInside(). Set it to true to draw the inside of a block! (Overriding shouldSideBeRendered from Block to always return true may also be a good idea).

If anyone has a comprehensive, visual guide to GUIs - don't hesitate to message me. They make my head spin.

Posted

SOLVED!

 

RenderBlocks has a method called setRenderFromInside(). Set it to true to draw the inside of a block! (Overriding shouldSideBeRendered from Block to always return true may also be a good idea).

Note on RenderBlocks.setRenderFromInside(): you should only set it to true only when your block is rendered. And after - back to false... Because otherwise ALL blocks will be rendered from inside... Which will decrease fps a lot...

Posted

If I agreed with you, I wouldn't have been asking the question for two days now.

 

The Tessellator is just a wrapper around OGL calls, with the assumption that you want to draw quads.  Quads are just four vertices specified in a specific order (counterclockwise, iirc).  Cubes consist of 6 sides (12 if you count the inside faces) and 8 verticies.

 

Drawing each set of 4 to make a side doesn't matter what direction you draw in, because you're going to draw in both in order to get the front face and the back face anyway.

 

Anyway, glad you found setRenderFromInside().  I didn't know it existed,  and thanks to elix for mentioning the caveat.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Note on RenderBlocks.setRenderFromInside(): you should only set it to true only when your block is rendered. And after - back to false... Because otherwise ALL blocks will be rendered from inside... Which will decrease fps a lot...

Thanks for the pointer - and I tried it to see what it would do. Turns out - it will ONLY render the insides of all blocks. In other words, you'll notice quite quickly....

If anyone has a comprehensive, visual guide to GUIs - don't hesitate to message me. They make my head spin.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.