Render issue with simplepbr on other machines

IDK if it’s the same issue but I’m hoping that a quick ‘same’ and some context will help find a solution.

running panda3d-simplepbr, both python mayapp.py and the built app run fine on my development machines (OSX 11 x86_64, Win10 x86_64) , but, on other machines… (OSX 11 x86, Win 10)

(1) shadows render incorrectly (whether directional or spotlight)
(2) if self.pipeline.use_normal_maps = True, any geometry without an explicit normal map seems to render at the wrong Z-order

bad shadow


normal-map
correct result on development machine

You could try a positive vert normalization by setting it that way in the simplepbr frag shader at this line:

vec3 v = normalize(-v_position);

vec3 v = normalize(v_position);

// vec3 v = normalize(-v_position);
vec3 v = normalize(v_position);

no difference in either case

On the machines that display the incorrect shadows, does the log-file/console output show any errors?

(I’m wondering whether those machines don’t perhaps lack support for some graphics-feature that “simplepbr” relies upon.)

log file shows no complaints
I’ve confirmed that it renders correctly on a third machine, so it’s down to being an unreported issue running vs intel integrated GPU

What options are you using to initialize simplepbr? If there are no errors/warnings from Panda or simplepbr, then I can only suspect a GPU/driver bug (i.e., misreporting a feature as available, which is Intel’s Windows OpenGL driver has a nasty habit of doing).

self.pipeline = simplepbr.init(render_node=scene, enable_shadows=True)
 # self.pipeline.use_normal_maps = True

scene is a node directly under ‘render’

To simplify things, I’ve started on a test-app that gets rid of all my dependencies. (I haven’t run it on the test machine yet. build issues. :slightly_frowning_face: ) Will update soon.

pbrtest.py

from direct.showbase.ShowBase import ShowBase
from panda3d.core import Material, NodePath, DirectionalLight, AmbientLight, BitMask32, load_prc_file_data
import simplepbr

load_prc_file_data(
‘’,
‘texture-minfilter mipmap\n’
‘texture-anisotropic-degree 16\n’
“audio-library-name null\n”
)

class MyApp(ShowBase):
def init(self):

    ShowBase.__init__(self)
    render = self.render
    render.setShaderAuto()
    self.pipeline = simplepbr.init(render_node=render, enable_shadows=True)

    box1:NodePath = self.loader.loadModel("models/box")
    box = box1.instance_under_node(render, "box")

    floor = box1.instance_under_node(self.render, "floor")
    floor.set_scale(100, 100, 10)
    floor.set_pos(-50, -50, -12)

    mat = Material()
    mat.set_roughness(.5)
    mat.set_ambient((0,0,0,1))
    mat.set_diffuse((1,1,1, 1))
    mat.set_specular((.5, .5, .5, 1))
    mat.set_metallic(1)
    floor.set_material(mat)

    box.set_pos(0, 12, -2)

    mat = Material()
    mat.set_roughness(.45)
    mat.set_ambient((0,0,0,1))
    mat.set_diffuse((1,1,1, 1))
    mat.set_specular((.5, .5, .5, 1))
    mat.set_metallic(1)
    box.set_material(mat)

    dlight = DirectionalLight('my dlight')
    dlight.setColor((10,10,10, 1))
    dlnp = render.attachNewNode(dlight)
    dlnp.set_pos(15, 0, 10)
    dlnp.look_at(box)
    dlight.setShadowCaster(True, 2048, 2048)
    render.setLight(dlnp)


    light = AmbientLight('ambientLight')
    light.setColor((0.03, 0.03, 0.03, 1))
    render.setLight(render.attachNewNode(light))

app = MyApp()
app.run()