Giter Club home page Giter Club logo

trippygl's Issues

SimpleShaderProgramBuilder with DiscardTransparentFragments set throws ShaderCompilationException

Repro Steps:

  1. Create a SimpleShaderProgramBuilder
  2. Set DiscardTransparentFragments to true
  3. Build shader

Expected Results: Shader generate correclty
Actual Results: TrippyGL.ShaderCompilationException: 'FragmentShaderArb didn't compile properly:
0(16) : error C1048: invalid character 'A' in swizzle "A"
'

Cause is in SimpleShaderProgramBuilder.cs line 303, the GLSL code "if (finalColor.A <" is invalid, the A should be lowercase.

NuGet package

Looking into tinkering around with this project a bit, any plans on release a nuget package? Also noticed the project doesn't have any CI testing with Azure DevOps or GitHub Actions.
Should I just use this as a submodule for now?

System.MissingMethodException: Method not found

Hello, today, when i tryed to load Texture2D with Texture2DExtensions, i get a System.MissingMethodException: Method not found

Code to load: texturea = Texture2DExtensions.FromImage(device, SixLabors.ImageSharp.Image.Load<SixLabors.ImageSharp.PixelFormats.Rgba32>("1.jpg"));

Full stacktrace:

Unhandled exception. System.MissingMethodException: Method not found: 'Boolean SixLabors.ImageSharp.Image`1.TryGetSinglePixelSpan(System.Span`1<!0> ByRef)'.
   at TrippyGL.ImageSharp.Texture2DExtensions.FromImage(GraphicsDevice graphicsDevice, Image`1 image, Boolean generateMipmaps)
   at silknetlearn.GameWindow.Load() in D:\C#\silknetlearn\Program.cs:line 84
   at Silk.NET.Windowing.Internals.ViewImplementationBase.Initialize()
   at Silk.NET.Windowing.WindowExtensions.Run(IView view)
   at silknetlearn.GameWindow..ctor() in D:\C#\silknetlearn\Program.cs:line 46
   at silknetlearn.Program.Main(String[] args) in D:\C#\silknetlearn\Program.cs:line 16

Fix uniform names on struct arrays

The name of the uniforms isn't properly cut.

This is because of the code at the constructor of ShaderUniform:

internal ShaderUniform(ShaderProgram owner, int uniformLoc, string name, int size, UniformType type)
{
OwnerProgram = owner;
UniformLocation = uniformLoc;
Size = size;
UniformType = type;
// The name might come as array name for array uniforms.
// We need to turn the name "arrayUniform[0]" into just "arrayUniform"
int nameIndexOfThing = name.LastIndexOf('[');
Name = nameIndexOfThing > 0 ? name.Substring(0, nameIndexOfThing) : name;

From the relevant discord conversation:
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.