Skip to content

Conversation

@RenaudRohlinger
Copy link
Collaborator

@RenaudRohlinger RenaudRohlinger commented Jan 19, 2024

Add a new parameter to the WebGPURenderer to force the WebGL backend even if WebGPU is available.

Example usage:

const renderer = new WebGPURenderer( { preferWebGL: true } );

This contribution is funded by Utsubo

@RenaudRohlinger RenaudRohlinger added this to the r161 milestone Jan 19, 2024
@Mugen87 Mugen87 changed the title WebGPURenderer: new preferWebGL parameter WebGPURenderer: Add preferWebGL parameter. Jan 19, 2024
@RenaudRohlinger RenaudRohlinger merged commit fe3a039 into mrdoob:dev Jan 19, 2024
@sunag
Copy link
Collaborator

sunag commented Jan 19, 2024

What do you think of forceWebGL?

@LeviPesin
Copy link
Contributor

Why not just new Renderer( new WebGLBackend( ... ) )?

@RenaudRohlinger
Copy link
Collaborator Author

RenaudRohlinger commented Jan 20, 2024

What do you think of forceWebGL?
I'm fine with it 👍

Why not just new Renderer( new WebGLBackend( ... ) )?

I'd say that this feels a lot easier to use:

import WebGPURenderer

new WebGPURenderer( { forceWebGL: overrideInASpecificCase })

than:

import Renderer
import WebGLBackend
import WebGPURenderer

if ( overrideInASpecificCase ) {

renderer = new Renderer( new WebGLBackend( ... ) )

} else {

renderer = new WebGPURenderer()

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants