Skip to main content
Tweeted twitter.com/StackGameDev/status/1366221689311363072
Became Hot Network Question
Focusing on the problem to solve, not the guessed solution
Source Link
DMGregory
  • 136.3k
  • 22
  • 247
  • 373

Do alternatives exist How to write shaders that can be compiled for NVIDIA's CG?DirectX, OpenGL, and Vulkan

I recently finished writing the DirectX renderer for my game engine. Now I have an OpenGL, DirectX as well as a not yet finished Vulkan renderer.

Well, the majority of the renderers work perfectly now but I have a problem: I need a shader programming language.

The problem is that OpenGL and Vulkan use GLSL but DirectX uses HLSL (and Apple's Metal API uses MSL). So I searched for a High Level Shader Language and found only C for graphics from NVIDIA. But since this project was deprecated I looked for something else: Without success.

It's a bit annoying to write for 3 shader programming languages at the same time, so I'm looking for a language that can be translated into the native language immediately when the game starts (or is simply compatible with a lot of rendering APIs)

After several weeks of finding nothing, I decided to write my own language for it. But before I invest too much time I want to know if there are already existing alternatives for Cg.is another solution to this problem.

Do alternatives exist for NVIDIA's CG?

I recently finished writing the DirectX renderer for my game engine. Now I have an OpenGL, DirectX as well as a not yet finished Vulkan renderer.

Well, the majority of the renderers work perfectly now but I have a problem: I need a shader programming language.

The problem is that OpenGL and Vulkan use GLSL but DirectX uses HLSL (and Apple's Metal API uses MSL). So I searched for a High Level Shader Language and found only C for graphics from NVIDIA. But since this project was deprecated I looked for something else: Without success.

After several weeks of finding nothing, I decided to write my own language for it. But before I invest too much time I want to know if there are already existing alternatives for Cg.

How to write shaders that can be compiled for DirectX, OpenGL, and Vulkan

I recently finished writing the DirectX renderer for my game engine. Now I have an OpenGL, DirectX as well as a not yet finished Vulkan renderer.

Well, the majority of the renderers work perfectly now but I have a problem: I need a shader programming language.

The problem is that OpenGL and Vulkan use GLSL but DirectX uses HLSL (and Apple's Metal API uses MSL). So I searched for a High Level Shader Language and found only C for graphics from NVIDIA. But since this project was deprecated I looked for something else: Without success.

It's a bit annoying to write for 3 shader programming languages at the same time, so I'm looking for a language that can be translated into the native language immediately when the game starts (or is simply compatible with a lot of rendering APIs)

After several weeks of finding nothing, I decided to write my own language for it. But before I invest too much time I want to know if there is another solution to this problem.

Source Link

Do alternatives exist for NVIDIA's CG?

I recently finished writing the DirectX renderer for my game engine. Now I have an OpenGL, DirectX as well as a not yet finished Vulkan renderer.

Well, the majority of the renderers work perfectly now but I have a problem: I need a shader programming language.

The problem is that OpenGL and Vulkan use GLSL but DirectX uses HLSL (and Apple's Metal API uses MSL). So I searched for a High Level Shader Language and found only C for graphics from NVIDIA. But since this project was deprecated I looked for something else: Without success.

After several weeks of finding nothing, I decided to write my own language for it. But before I invest too much time I want to know if there are already existing alternatives for Cg.