Open topic with navigation
This sample demonstrates how to interoperate between OpenGL [ES] and a simple OpenGL Compute Shader-based compute kernel.
The OpenGL samples all share a common app framework and certain user interface elements, centered around the "Tweakbar" panel on the left side of the screen, which lets you interactively control certain variables in each sample.
To show and hide the Tweakbar, simply click or touch the triangular button positioned in the top-left of the view.
Other controls are listed below.
This sample shows how to access GL textures efficiently from a compute shader, for both reading and writing.
It loads a source texture from a dds file, creates an output texture of equal size, then performs the following every frame:
Bind both input and output textures to image units for compute use.
Execute the compute kernel, which performs a simple color invert.
Draw output texture to screen.
The Compute filter pass can be toggled from the UI.
NVIDIA® GameWorks™ Documentation Rev. 1.0.200608 ©2014-2020. NVIDIA Corporation. All Rights Reserved.