Skip to content

Comments

[WIP] Share stratum textures from terrain.fx to mesh.fx#120

Open
Strogoo wants to merge 1 commit intoFAForever:masterfrom
Strogoo:Textures_to_mesh
Open

[WIP] Share stratum textures from terrain.fx to mesh.fx#120
Strogoo wants to merge 1 commit intoFAForever:masterfrom
Strogoo:Textures_to_mesh

Conversation

@Strogoo
Copy link

@Strogoo Strogoo commented May 27, 2025

Asked by BlackYps. Only textures for now, without float4 %name%Tile (will add later). Names are shorter than in terrain.fx to store them in char (length<15) and not call std::string for pointer. Also less pointers - easier to debug :)

#define DECLARE_STRATUM(n)                     \
    float4 n##Tile;                            \
    texture n##Tex;                            \
    sampler2D n##Sampler = sampler_state       \
    {                                          \
        Texture   = <n##Tex>;                  \
        MipFilter = LINEAR;                    \
        MinFilter = LINEAR;                    \
        MagFilter = LINEAR;                    \
        AddressU  = WRAP;                      \
        AddressV  = WRAP;                      \
    };

DECLARE_STRATUM(LowerAlb)
DECLARE_STRATUM(Strat0Alb)
DECLARE_STRATUM(Strat1Alb)
DECLARE_STRATUM(Strat2Alb)
DECLARE_STRATUM(Strat3Alb)
DECLARE_STRATUM(Strat4Alb)
DECLARE_STRATUM(Strat5Alb)
DECLARE_STRATUM(Strat6Alb)
DECLARE_STRATUM(Strat7Alb)
DECLARE_STRATUM(UpperAlb)
DECLARE_STRATUM(LowerNorm)
DECLARE_STRATUM(Strat0Norm)
DECLARE_STRATUM(Strat1Norm)
DECLARE_STRATUM(Strat2Norm)
DECLARE_STRATUM(Strat3Norm)
DECLARE_STRATUM(Strat4Norm)
DECLARE_STRATUM(Strat5Norm)
DECLARE_STRATUM(Strat6Norm)
DECLARE_STRATUM(Strat7Norm)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant