Custom shader - failed to create texture

  • TrippleDDD
  • Topic Author
More
3 months 1 week ago #1 by TrippleDDD Custom shader - failed to create texture was created by TrippleDDD
Hi all,

I've been using ReShade and lurking anonymously for many years but never actually made an account so... Hello!

Mostly as a learning exercise, I'm trying to create my own HLSL shader that emulates how enb palette used to work (maybe still does - haven't used it for a veeeery long time!), references a 256x256 png LUT texture and makes colour adjustments accordingly. But I can't get it to compile. Here is the error I keep getting no matter what I try:
13:47:00:431 [15008] | ERROR | Failed to create texture 'V__DDDPaletteTex' (width = 1, height = 1, levels = 1, format = 0, usage = 0xcc0)! Make sure the texture dimensions are reasonable.

I have double and triple-checked that files are in the right locations, tried bmp and png formats, texture path is correct in reshade.ini, no read-only flags are applied, cleared shader cache and reloaded effects etc. I even used ChatGPT 4.1 to help troubleshoot and I still can't work out what the issue is.

Here's my shader, that ChatGPT is adamant should work, but it doesn't. Could someone much smarter than I am please be kind enough to tell me where I'm going wrong?

Warning: Spoiler!


Many thanks :)

Please Log in or Create an account to join the conversation.

  • crosire
More
3 months 1 week ago #2 by crosire Replied by crosire on topic Custom shader - failed to create texture
You need to define the width, height and format of "DDDPaletteTex", e.g.
texture DDDPaletteTex < source = "DDDpalette.png"; >
{
    Width = 100; // Set these to width and height of your image file
    Height = 100;
    Format = RGBA8;
};

Please Log in or Create an account to join the conversation.