mirror of
https://github.com/HarbourMasters/Starship.git
synced 2025-04-28 12:27:59 +03:00
Bump LUS (#190)
* Bump LUS * Disabled shader-based linear conversion on metal * Fixed missing mInterpolationIndex * Bump LUS --------- Co-authored-by: KiritoDv <kiritodev01@gmail.com>
This commit is contained in:
parent
8fa4237893
commit
1e51cd682b
2 changed files with 11 additions and 21 deletions
|
@ -147,17 +147,6 @@ float random(float3 value) {
|
|||
return fract(sin(random) * 143758.5453);
|
||||
}
|
||||
|
||||
float4 fromLinear(float4 linearRGB) {
|
||||
float3 threshold = float3(0.0031308);
|
||||
float3 gamma = float3(1.0 / 2.4);
|
||||
float3 scale = float3(12.92);
|
||||
float3 offset = float3(1.055);
|
||||
float3 subtract = float3(0.055);
|
||||
float3 higher = offset * fast::pow(linearRGB.xyz, gamma) - subtract;
|
||||
float3 lower = linearRGB.xyz * scale;
|
||||
return float4(select(higher, lower, linearRGB.xyz < threshold), linearRGB.w);
|
||||
}
|
||||
|
||||
fragment float4 fragmentShader(ProjectedVertex in [[stage_in]], constant FrameUniforms &frameUniforms [[buffer(0)]]
|
||||
@if(o_textures[0])
|
||||
, texture2d<float> uTex0 [[texture(0)]], sampler uTex0Smplr [[sampler(0)]]
|
||||
|
@ -288,8 +277,8 @@ fragment float4 fragmentShader(ProjectedVertex in [[stage_in]], constant FrameUn
|
|||
@if(o_invisible)
|
||||
texel.w = 0.0;
|
||||
@end
|
||||
return fromLinear(texel);
|
||||
return texel;
|
||||
@else
|
||||
return fromLinear(float4(texel, 1.0));
|
||||
return float4(texel, 1.0);
|
||||
@end
|
||||
}
|
|
@ -48,21 +48,21 @@ class GameEngine {
|
|||
static bool HasVersion(SF64Version ver); // sol:ignore
|
||||
};
|
||||
|
||||
extern "C" void* GameEngine_Malloc(size_t size); // sol:ignore
|
||||
|
||||
#define memallocn(type, n) (type*) GameEngine_Malloc(sizeof(type) * n) // sol:ignore
|
||||
#define memalloc(type) memallocn(type, 1) // sol:ignore
|
||||
Fast::Interpreter* GameEngine_GetInterpreter();
|
||||
#define memallocn(type, n) (type*) GameEngine_Malloc(sizeof(type) * n)
|
||||
#define memalloc(type) memallocn(type, 1)
|
||||
|
||||
extern "C" {
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#define memalloc(size) GameEngine_Malloc(size)
|
||||
#endif
|
||||
|
||||
void* GameEngine_Malloc(size_t size);
|
||||
bool GameEngine_HasVersion(SF64Version ver);
|
||||
void GameEngine_ProcessGfxCommands(Gfx* commands); // sol:ignore
|
||||
float GameEngine_GetAspectRatio();
|
||||
uint8_t GameEngine_OTRSigCheck(const char* imgData); // sol:ignore
|
||||
uint8_t GameEngine_OTRSigCheck(const char* imgData);
|
||||
uint32_t OTRGetCurrentWidth(void);
|
||||
uint32_t OTRGetCurrentHeight(void);
|
||||
float OTRGetHUDAspectRatio();
|
||||
|
@ -81,9 +81,10 @@ int16_t OTRGetRectDimensionFromLeftEdgeOverride(float v);
|
|||
int16_t OTRGetRectDimensionFromRightEdgeOverride(float v);
|
||||
uint32_t OTRGetGameRenderWidth();
|
||||
uint32_t OTRGetGameRenderHeight();
|
||||
void* GameEngine_Malloc(size_t size); // sol:ignore
|
||||
void GameEngine_GetTextureInfo(const char* path, int32_t* width, int32_t* height, float* scale, bool* custom); // sol:ignore
|
||||
#define memalloc(size) GameEngine_Malloc(size) // sol:ignore
|
||||
void* GameEngine_Malloc(size_t size);
|
||||
void GameEngine_GetTextureInfo(const char* path, int32_t* width, int32_t* height, float* scale, bool* custom);
|
||||
void gDPSetTileSizeInterp(Gfx* pkt, int t, float uls, float ult, float lrs, float lrt);
|
||||
uint32_t GameEngine_GetInterpolationFrameCount();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue