GHGL Post-Effects only work in Arctic Mode - sampler2D _colorBuffer is black

the posteffects samples do not work in shaded / wireframe etc. only in arctic

uniform sampler2D _colorBuffer; returns black by default and after switching back to shaded from arctic it works partially: it returns the background color and the grid, but no geometry

guess its an AMD thing?

Rhino6 SR13
Radeon RX 580 Series
OpenGL version: 3.3.13547 Core Profile Context 25.20.15021.1007
Render version: 3.3
Shading Language: 4.60

Core Profile? Could you post the full results of SystemInfo? Those stats aren’t making a lot of sense to me at the moment

Rhino 6 SR13 2019-2-27 (Rhino 6, 6.13.19058.371, Git hash:master @ 17cd8b51accbe17dd04b48028f49d5e77a67f17b)
License type: Educational, build 2019-02-27
License details: Cloud Zoo.  In use by: 

Windows 10.0 SR0.0 or greater (Physical RAM: 8Gb)
Machine name: 

Non-hybrid graphics.
Primary display and OpenGL: Radeon RX 580 Series (AMD) Memory: 8GB, Driver date: 2-12-2019 (M-D-Y). OpenGL Ver: 4.6.13547 Compatibility Profile Context 25.20.15021.1007

OpenGL Settings
  Safe mode: Off
  Use accelerated hardware modes: On
  Redraw scene when viewports are exposed: On
  Anti-alias mode: 8x
  Mip Map Filtering: Linear
  Anisotropic Filtering Mode: Height
  Vendor Name: ATI Technologies Inc.
  Render version: 3.3
  Shading Language: 4.60
  Driver Date: 2-12-2019
  Driver Version: 25.20.15021.1007
  Maximum Texture size: 16384 x 16384
  Z-Buffer depth: 24 bits
  Maximum Viewport size: 16384 x 16384
  Total Video Memory: 8 GB

Rhino plugins
  C:\Program Files\Rhino 6\Plug-ins\Commands.rhp	"Commands"	6.13.19058.371
  C:\Program Files\Rhino 6\Plug-ins\WebBrowser.rhp	"WebBrowser"	
  C:\Program Files\Rhino 6\Plug-ins\rdk.rhp	"Renderer Development Kit"	
  C:\Program Files\Rhino 6\Plug-ins\RhinoScript.rhp	"RhinoScript"	
  C:\Program Files\Rhino 6\Plug-ins\IdleProcessor.rhp	"IdleProcessor"	
  C:\Users\x02\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\CreateQuadMesh (5bf6c0f3-3657-4ad5-834a-bbbb52706a40)\6.0.6950.16446\CreateQuadMesh.rhp	"CreateQuadMesh"	6.0.6950.16446
  C:\Program Files\Rhino 6\Plug-ins\RhinoRender.rhp	"Rhino Render"	
  C:\Program Files\Rhino 6\Plug-ins\rdk_etoui.rhp	"RDK_EtoUI"	6.13.19058.371
  C:\Program Files\Rhino 6\Plug-ins\rdk_ui.rhp	"Renderer Development Kit UI"	
  C:\Program Files\Rhino 6\Plug-ins\NamedSnapshots.rhp	"Snapshots"	
  C:\Program Files\Rhino 6\Plug-ins\Alerter.rhp	"Alerter"	
  C:\Program Files\Rhino 6\Plug-ins\IronPython\RhinoDLR_Python.rhp	"IronPython"	6.13.19058.371
  C:\Program Files\Rhino 6\Plug-ins\RhinoCycles.rhp	"RhinoCycles"	6.13.19058.371
  C:\Program Files\Rhino 6\Plug-ins\Grasshopper\GrasshopperPlugin.rhp	"Grasshopper"	6.13.19058.371
  C:\Program Files\Rhino 6\Plug-ins\Toolbars\Toolbars.rhp	"Toolbars"	6.13.19058.371
  C:\Program Files\Rhino 6\Plug-ins\3dxrhino.rhp	"3Dconnexion 3D Mouse"	
  C:\Program Files\Rhino 6\Plug-ins\Displacement.rhp	"Displacement"

and from OpenGL Info:

ATI Technologies Inc.
Radeon RX 580 Series
OpenGL version: 3.3.13547 Core Profile Context 25.20.15021.1007
Render version: 3.3
Shading Language: 4.60
Driver Date: 2-12-2019
Driver Version: 25.20.15021.1007

Did a driver update and turned off any fancy application-based settings (AMD shader cache etc) and used a ‘default’ display mode - no custom lights, materials etc. still black…

edit: the as said the effect works on the background, but only if geometry is inside the frustum; once the last pixel of a brep leaves the viewport, it turns black again

I don’t think there is any reason you should run in core profile.

How to switch to ‘normal’? AMD Radeon Settings has no options for that

Try running TestGLCoreProfile. What is printed on the command-line when you do so? OpenGL 3.x Core Profile context is now: DISABLED or OpenGL 3.x Core Profile context is now: ENABLED? Restart Rhino after you’ve run the command and checked its output in the command-line.

Did it, restarted info is now saying Compatibility Profile Context, but still black on the Shader

I’ll leave further debugging to the father of the component, @stevebaer

Do you have access to a recent V7 WIP? I would be curious what results you get there as the technique for capturing the frame buffer to a texture is very different than what is done in V6.

Works fine in V7!

Great, so either this is working due to the other technique used or because there is some setting in V6 that is getting in the way. You might want to check out the advanced settings in V6 and see if any OpenGL settings are in a non-default state.

The technique used in V7 is much more efficient than V6; it just wasn’t available in V6.

OpenGL.MajorVersion = 2 is bold and i cant set it to 0 (default), it reverts back… apart from that everything else is default…

also what is the way to deactivate the shader? it stays ‘On’ even after its disabled

ps: it would be cool if we could set our own samplers

Turn the preview off to deactivate the shader.

You can already do that. Download the file and the quito_graffiti.jpg files from here and place them in the same directory

ok - now it is getting interesting: the sampler is black too!
downloaded the whole thing from github,, - all black!
some incompatible texture format in AMD cards maybe?

edit: even more confusion - in v7 wip image_mix and pixelate draw only the frame outline, no black - just transparent… on the other hand ‘’ the textures and normal map show up just fine… in V6 there is no Rhino-Logo drawn at all…

Does the Picture command in Rhino work for you? We tried on a different AMD card and are not seeing a problem. Most likely there is some tweak I need to make to GhGL texture generation that will fix this.

Picture works fine
And once i have a picture frame in the viewport, the pixelate filter works partially: it draws the wireframe, but no shading
furthermore in Artistic the Picture on the plane from the Picture Command shows up as background instead of the paper grain (once the shader is on)

I just published a new version of GhGL (v0.4.2) which you should be able to get through TestPackageManager. I would be interested to know if this version works any better with textures on your GPU.

1 Like

Works perfectly! Thanks!

Great! thanks for letting me know

I noticed a comment on the OpenGL reference pages about a bug in ATI drivers along with a workaround at