Skip to content
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

F_sluminance* textures are not supported in core profile OpenGL #693

Closed
lachbr opened this issue Jul 26, 2019 · 8 comments

Comments

@lachbr
Copy link
Contributor

commented Jul 26, 2019

Possible solution would be to duplicate the channels out to F_srgb.

@rdb rdb added this to the 1.10.4 milestone Jul 29, 2019

@rdb

This comment has been minimized.

Copy link
Member

commented Aug 1, 2019

Actually, which video card and operating system/driver are you using? I was making a test case for this and sluminance textures seem to work fine in a core-only profile.

@lachbr

This comment has been minimized.

Copy link
Contributor Author

commented Aug 1, 2019

I’m using a Nvidia GTX 1060 on Windows 10.

@rdb

This comment has been minimized.

Copy link
Member

commented Aug 1, 2019

Yeah, interesting, NVIDIA drivers have an issue with it but Intel don't.

Could someone with an AMD card run this and let me know whether it errors, or displays a grey screen without errors?

from panda3d.core import *
load_prc_file_data("", """
gl-version 3 2
gl-debug true
""")

from direct.directbase import DirectStart

print("Video card: ", base.win.gsg.driver_renderer)

cm = CardMaker("")
cm.set_frame_fullscreen_quad()
card = render2d.attach_new_node(cm.generate())

img = PNMImage(32, 32, 1)
img.set_color_space(CS_sRGB)
img.fill(0.5)

tex = Texture("grayscale")
tex.load(img)
tex.set_format(Texture.F_sluminance)
card.set_texture(tex)

base.run()
@rdb

This comment has been minimized.

Copy link
Member

commented Aug 1, 2019

Annoyingly, the NVIDIA drivers return true when I check for glGetInternalformativ(GL_TEXTURE_2D, GL_SLUMINANCE8, GL_INTERNALFORMAT_SUPPORTED, 1, &param). I might report this as a driver bug.

@el-dee

This comment has been minimized.

Copy link
Contributor

commented Aug 2, 2019

It doesn't work either on Mac with AMD card :

Using deprecated DirectStart interface.
Known pipe types:
  CocoaGraphicsPipe
(all display modules loaded.)
:display:gsg:glgsg(warning): gl-debug enabled, but NOT supported.
Panda version: 1.10.3 (adaf9ee4aa908cef4d2e99895132b716f3f21b2a)
Video card:  AMD Radeon Pro 555X OpenGL Engine
:display:gsg:glgsg(warning): Shader created-shader produced the following warnings:
WARNING: Could not find vertex shader attribute 'vertex' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'p3d_Normal' to match BindAttributeLocation request.
WARNING: Could not find fragment shader output 'p3d_FragData' to match FragDataBinding request.

:display:gsg:glgsg(error): GL texture creation failed for smiley : invalid enumerant
:display:gsg:glgsg(error): Could not load smiley

(using smiley.rgb as there is no grayscale.png shipped with Panda 1.10.3)

@rdb rdb closed this in 8be70ed Aug 12, 2019

@rdb

This comment has been minimized.

Copy link
Member

commented Aug 12, 2019

@lachbr this is implemented, could you test it and let me know whether it is working in your use case? Thanks!

@lachbr

This comment has been minimized.

Copy link
Contributor Author

commented Aug 13, 2019

Great. I'm going to build Panda right now and let you know as soon as I can.

@lachbr

This comment has been minimized.

Copy link
Contributor Author

commented Aug 13, 2019

@rdb Works perfectly, thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.