cpt-max / MonoGame

One framework for creating powerful cross-platform games.
http://www.monogame.net
Other
26 stars 5 forks source link

DesktopGL pixel shader contains out of range texture slot #6

Open BitKovin opened 2 months ago

BitKovin commented 2 months ago

Prerequisites

MonoGame Version

compute_shader branch

Which MonoGame platform are you using?

MonoGame Cross-Platform Desktop Application (mgdesktopgl)

Operating System

Windows

Description

I'm using big shader function library file that contains most of definitions. It works fine on DirectX or OpenGl with shader model 3(If I understand correctly, shaders with older shader models are being compiled with MojoShader). But when shader uses SM5 and gets compiled for openGL(without errors) image image

I'm sorry that program that reproduces result has so many unused shader code. I'm trying to localize problem, but it's best I could do so far.

Steps to Reproduce

I've attached demo program with source shader and precompiled content(same shader). You need to add reference to MonoGame.Framework.DesktopGL in project.

Minimal Example Repo

No response

Expected Behavior

Program should work same on DesktopGL and WindowsDX.

Resulting Behavior

Program crashes with Index out of range exeption

Files

test.zip