Cool VL Viewer forum

View unanswered posts | View active topics It is currently 2024-03-19 03:40:51



Reply to topic  [ 5 posts ] 
Can't turn on ALM in Cool VL Viewer 1.30.2.6 & OpenGL 4.1 
Author Message

Joined: 2012-01-19 03:18:40
Posts: 196
Location: Sydney, Australia (UTC +10)
Reply with quote
Henri Beauchamp wrote:
Today's release (v1.30.2.6) got the fixes implemented and should therefore work again under macOS...

Note that OpenGL v3.2 core profile is enabled by default in the sources; if you need to disable it (i.e. should it cause any rendering issue), you can do so by setting USE_DARWIN_GL3 to OFF, line 74 of linden/indra/cmake/00-BuildOptions.cmake before compiling the viewer (and please, do report any such issue).
First I built v1.30.2.6 with USE_DARWIN_GL3 to ON, but unfortunately with this setting I cannot turn on ALM. I can check the box, but when I click on Apply, the box unchecks itself. I then built with USE_DARWIN_GL3 to OFF, and with that setting ALM works fine. So it seems as if my Macs don't like OpenGL above 2.1. Interestingly the About floater said I was using OpenGL version: 4.1 in my USE_DARWIN_GL3 ON build. I have attached logs and the About text for both builds below.


Attachments:
CoolVLViewer-OpenGL4.1.zip [27.68 KiB]
Downloaded 34 times
CoolVLViewer-OpenGL2.1.zip [24.44 KiB]
Downloaded 24 times
2023-03-20 14:09:28
Profile

Joined: 2009-03-17 18:42:51
Posts: 5523
Reply with quote
A problem with the FXAA shader...
Code:
2023-03-20 13:22:11Z WARNING: LLShaderMgr::loadShaderFile: GLSL compilation error: 0 - Shader file: deferred/fxaaF.glsl
2023-03-20 13:22:11Z WARNING: LLShaderMgr::loadShaderFile: Failed to load deferred/fxaaF.glsl
2023-03-20 13:22:11Z WARNING: LLGLSLShader::createShader: Failed to map attributes for: FXAA low quality shader
2023-03-20 13:22:11Z WARNING: LLGLSLShader::createShader: Failed to map uniforms for: FXAA low quality shader
2023-03-20 13:22:11Z WARNING: LLGLSLShader::createShader: Failed to link using shader level 1 trying again using shader level 0
Please, start the viewer with ALM off, then enable "Debug GL" in "Advanced" -> "Rendering" -> "Render tests", and switch ALM on: the log should tell us what it does not like in the FXAA shader.
Also, you might be able to enable the SMAA shader instead (which is way better anyway)...

Quote:
Interestingly the About floater said I was using OpenGL version: 4.1 in my USE_DARWIN_GL3 ON build.
Hmm... We might be able to switch to OpenGL v4.1 then...

This could be done by replacing "NSOpenGLProfileVersion3_2Core" with "NSOpenGLProfileVersion4_1Core" line 244 of linden/indra/llwindow/llopenglview-objc.mm, and then finding the right GLSL version to use (lines 414 to 420 of linden/indra/llrender/llgl.cpp, maybe even disabling that block entirely with "#if LL_DARWIN && 0" line 412): starting the resulting viewer binary with "DebugGLOnRestart" set to TRUE from the previous (working) session would list the problem in the log, should the viewer window stay black.

Also, not changing for GL v4.1 in linden/indra/llwindow/llopenglview-objc.mm, you could try and disable the macOS workaround in linden/indra/llrender/llgl.cpp (using "#if LL_DARWIN && 0" line 412), and see what happens (that would use the shader language version advertised by macOS instead of limiting it to v1.40)...


EDIT: I produced a version that can be switched at runtime between OpenGL v2.1 compatibility profile and Open GL core profile (v3.2 or 4.1, as macOS sees fit), by toggling the "Enable core GL profile" check box (and restarting the viewer) in the "Preferences" floater, "Graphics" tab, "GPU/GL features" sub-tab. It also limits GLSL to v1.20 for OpenGL v2.1 (as usual), v1.40 when the advertised OpenGL version is below v3.3 (as v1.30.2.6 did), and adopts whatever GLSL version advertised for OpenGL v3.3 and better: this should hopefully make macOS happy enough... I am sending you the URL of the sources tarball via a PM; please let me know how it fares for you.


2023-03-20 14:26:51
Profile WWW

Joined: 2012-01-19 03:18:40
Posts: 196
Location: Sydney, Australia (UTC +10)
Reply with quote
Henri Beauchamp wrote:
I produced a version that can be switched at runtime between OpenGL v2.1 compatibility profile and Open GL core profile (v3.2 or 4.1, as macOS sees fit), by toggling the "Enable core GL profile" check box (and restarting the viewer) in the "Preferences" floater, "Graphics" tab, "GPU/GL features" sub-tab. It also limits GLSL to v1.20 for OpenGL v2.1 (as usual), v1.40 when the advertised OpenGL version is below v3.3 (as v1.30.2.6 did), and adopts whatever GLSL version advertised for OpenGL v3.3 and better: this should hopefully make macOS happy enough... I am sending you the URL of the sources tarball via a PM; please let me know how it fares for you.
I have built and tested this beta, and it seems to have fixed the problem completely. I am able to use ALM normally in both OpenGL v2.1 compatibility and OpenGL core (4.1 according to the About floater) modes.
Quote:
Please, start the viewer with ALM off, then enable "Debug GL" in "Advanced" -> "Rendering" -> "Render tests", and switch ALM on: the log should tell us what it does not like in the FXAA shader. Also, you might be able to enable the SMAA shader instead (which is way better anyway)...
Given the success described above, do you still need me to do the advanced logging? And yes, in the beta I can enable the SMAA shader instead of FXAA. SMAA does seem to make textures slightly sharper as described in the tool-tip. I only ever run 2x antialiasing, so maybe I'm not getting the full value of this.


2023-03-21 04:31:57
Profile

Joined: 2009-03-17 18:42:51
Posts: 5523
Reply with quote
linyifei wrote:
I have built and tested this beta, and it seems to have fixed the problem completely. I am able to use ALM normally in both OpenGL v2.1 compatibility and OpenGL core (4.1 according to the About floater) modes.
Great !

linyifei wrote:
Given the success described above, do you still need me to do the advanced logging?
No, no need any more, thank you for your help in diagnosing all these macOS idiosyncrasies !

linyifei wrote:
And yes, in the beta I can enable the SMAA shader instead of FXAA. SMAA does seem to make textures slightly sharper as described in the tool-tip.
It provides much sharper textures (simply by not blurring them like what the lame FXAA shader is doing), but it is indeed less obvious on high DPI screens where the blur is "hidden" by the simple fact that there are too many pixels per square millimeter for your eyes to fully notice it...

linyifei wrote:
I only ever run 2x antialiasing, so maybe I'm not getting the full value of this.
Classic (native/GPU-side) SSAA would only affect the forward (non-ALM) rendering mode, but on screens with less than 120 dpi, 4x is the "perfect" setting to use (8x does not bring anything, but 2x is too low). It provides much finer edges than SMAA still, which makes me dread the loss of the forward rendering mode with the upcoming PBR viewer, especially for outdoor scenes (see this post of mine on SL's forum).


2023-03-21 08:58:46
Profile WWW

Joined: 2012-01-19 03:18:40
Posts: 196
Location: Sydney, Australia (UTC +10)
Reply with quote
What bothers me about LL's proposed PBR viewer is that apparently they're doing away with the simple "turn off ALM" checkbox. I spend the majority of my time in SL with ALM off, and the prospect of having to futz around fiddling with multiple separate graphics settings as a lame substitute is not appealing.


2023-03-22 04:48:08
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.