UIMask.fx - Custom file support

  • FierySwordswoman
  • Topic Author
More
6 years 11 months ago - 6 years 11 months ago #1 by FierySwordswoman UIMask.fx - Custom file support was created by FierySwordswoman
Unlike LUT.fx, UIMask.fx doesn't let you define a .png of your choosing as the texture source.
I fixed this by adding
#ifndef maskSource
   #define maskSource "UIMask.png"
#endif
after the #include, and changed line 150 (after edit) from
texture tUIMask_Mask <source="UIMask.png";> { Width = BUFFER_WIDTH; Height = BUFFER_HEIGHT; Format=TEXFORMAT; };
to
texture tUIMask_Mask <source=maskSource;> { Width = BUFFER_WIDTH; Height = BUFFER_HEIGHT; Format=TEXFORMAT; };

With that, you can add
sourceMask="NAME_OF_MASK.png"
to the preprocessor definitions to choose a custom image file.

I feel this would be a good feature to include in the master shaders. It adds a simple new feature consistent with other shaders without losing any previous functionality.
Last edit: 6 years 11 months ago by FierySwordswoman.

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

We use cookies
We use cookies on our website. Some of them are essential for the operation of the forum. You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.