How do i set inside faces of objects visible in shaders?

MowglyMowgly Posts: 5Member

I downloaded a fish model the materials of which had to be changed in blender so it works, then i imported it as another scene into godot so that i can edit it, but seems like i cannot edit the shader because it is not godot shader from godot but i could make a new shader material wich immediately turned the model white then i proceeded to add lines of fragment function to set the albedo according to a custom sampler2d it worked but the fishes fins are only visible from one side as the fins are one sided so there is an inner side presented towards one of the sides. i want to have that inner side visible i was attempting to mirror the normal binormal and tangent in case it is !FRONT_FACING but it did nothing. then i thought maybe i have to alter the light function but i wasnt going into it just yet.

Best Answers

  • GlyphTheWolfGlyphTheWolf Posts: 101
    Accepted Answer

    Hi,

    Probably you need to disable back face culling. In spatial shader there is property to set that and in custom shader you need to set render_mode properly to achieve that (but I don't remember exact option now).

  • MowglyMowgly Posts: 5
    Accepted Answer

    thats it its cull_disabled

Answers

  • GlyphTheWolfGlyphTheWolf Posts: 101Member
    Accepted Answer

    Hi,

    Probably you need to disable back face culling. In spatial shader there is property to set that and in custom shader you need to set render_mode properly to achieve that (but I don't remember exact option now).

  • MegalomaniakMegalomaniak Posts: 3,566Admin

    IIRC either cull_disabled or cull_front depending on specific needs.

  • MowglyMowgly Posts: 5Member
    Accepted Answer

    thats it its cull_disabled

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file