You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(This is a minor issue and should not particularly be prioritized, but I finally realized that it's why I was getting different results and it wasn't obvious to me, so I thought I'd at least write it down.)
In luminance-web-sys, asking for a context without passing WebGlContextAttributes or using the default values results the WebGL-specified default context attribute antialias: true.
This leads to inconsistent default behavior between the WebGL backend and any that use luminance-windowing. It might be an unpleasant surprise as antialias: true can result in additional artifacts that would only appear on web (depending on what you're doing in your shaders). Additionally, cross-platform apps currently have to use completely different data structures to control this and any future context options.
If there were a luminance-windowing data type holding only context options without window dimensions, then WebSysWebGL2Surface's constructors could accept that data type and convert it to WebGlContextAttributes. Thus, applications could choose to enable or disable antialiasing and any future options (or choose to use luminance-windowing's default) in a cross-platform way.
A simpler alternative — less powerful and potentially more surprising to users familiar with WebGL — would be to change the defaults when the _with_params constructor functions are not used, to have antialias: false.
The text was updated successfully, but these errors were encountered:
(This is a minor issue and should not particularly be prioritized, but I finally realized that it's why I was getting different results and it wasn't obvious to me, so I thought I'd at least write it down.)
luminance-windowing
,WindowOpt::num_samples
defaults toNone
.luminance-web-sys
, asking for a context without passingWebGlContextAttributes
or using the default values results the WebGL-specified default context attributeantialias: true
.This leads to inconsistent default behavior between the WebGL backend and any that use
luminance-windowing
. It might be an unpleasant surprise asantialias: true
can result in additional artifacts that would only appear on web (depending on what you're doing in your shaders). Additionally, cross-platform apps currently have to use completely different data structures to control this and any future context options.If there were a
luminance-windowing
data type holding only context options without window dimensions, thenWebSysWebGL2Surface
's constructors could accept that data type and convert it toWebGlContextAttributes
. Thus, applications could choose to enable or disable antialiasing and any future options (or choose to useluminance-windowing
's default) in a cross-platform way.A simpler alternative — less powerful and potentially more surprising to users familiar with WebGL — would be to change the defaults when the
_with_params
constructor functions are not used, to haveantialias: false
.The text was updated successfully, but these errors were encountered: