mirror of
https://github.com/SMGCommunity/Petari.git
synced 2025-02-25 00:21:25 +00:00
fix OceanRingDrawer::loadMaterialBloom
This commit is contained in:
parent
477f0e3fa2
commit
34ff75e205
@ -898,7 +898,7 @@ initParts__15OceanRingDrawerFv,OceanRingDrawer.o,Map.a,false
|
||||
initDisplayList__15OceanRingDrawerFv,OceanRingDrawer.o,Map.a,true
|
||||
drawGD__15OceanRingDrawerCFv,OceanRingDrawer.o,Map.a,false
|
||||
loadMaterial__15OceanRingDrawerCFv,OceanRingDrawer.o,Map.a,true
|
||||
loadMaterialBloom__15OceanRingDrawerCFv,OceanRingDrawer.o,Map.a,false
|
||||
loadMaterialBloom__15OceanRingDrawerCFv,OceanRingDrawer.o,Map.a,true
|
||||
GDBegin,OceanRingDrawer.o,Map.a,false
|
||||
GDOverflowCheck,OceanRingDrawer.o,Map.a,false
|
||||
GDWrite_f32,OceanRingDrawer.o,Map.a,false
|
||||
|
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"label": "Game",
|
||||
"message": "9.639501058207642%",
|
||||
"message": "9.662091470109344%",
|
||||
"color": "blue"
|
||||
}
|
@ -11,7 +11,7 @@
|
||||
| [GameAudio](https://github.com/shibbo/Petari/blob/master/docs/lib/GameAudio.md) | 0.0% |
|
||||
| [Gravity](https://github.com/shibbo/Petari/blob/master/docs/lib/Gravity.md) | 56.816792337477075% |
|
||||
| [LiveActor](https://github.com/shibbo/Petari/blob/master/docs/lib/LiveActor.md) | 39.26233287229138% |
|
||||
| [Map](https://github.com/shibbo/Petari/blob/master/docs/lib/Map.md) | 14.68627560210202% |
|
||||
| [Map](https://github.com/shibbo/Petari/blob/master/docs/lib/Map.md) | 15.124505598573895% |
|
||||
| [MapObj](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj.md) | 21.96642710792624% |
|
||||
| [NameObj](https://github.com/shibbo/Petari/blob/master/docs/lib/NameObj.md) | 27.009618687736175% |
|
||||
| [NPC](https://github.com/shibbo/Petari/blob/master/docs/lib/NPC.md) | 0.7591369440774989% |
|
||||
|
@ -52,7 +52,7 @@
|
||||
| OceanHomeMapCtrl.o | 0.0% | 0 / 6 | 0.0% | :x:
|
||||
| OceanRing.o | 5.137614678899083% | 2 / 21 | 9.523809523809524% | :eight_pointed_black_star:
|
||||
| OceanRingBloomDrawer.o | 0.0% | 0 / 4 | 0.0% | :x:
|
||||
| OceanRingDrawer.o | 28.51985559566787% | 5 / 21 | 23.809523809523807% | :eight_pointed_black_star:
|
||||
| OceanRingDrawer.o | 40.6910778751934% | 6 / 21 | 28.57142857142857% | :eight_pointed_black_star:
|
||||
| OceanRingPipe.o | 0.0% | 0 / 6 | 0.0% | :x:
|
||||
| OceanRingPipeInside.o | 0.0% | 0 / 11 | 0.0% | :x:
|
||||
| OceanRingPipeOutside.o | 0.0% | 0 / 11 | 0.0% | :x:
|
||||
@ -1214,7 +1214,7 @@
|
||||
| initDisplayList__15OceanRingDrawerFv | :white_check_mark: |
|
||||
| drawGD__15OceanRingDrawerCFv | :x: |
|
||||
| loadMaterial__15OceanRingDrawerCFv | :white_check_mark: |
|
||||
| loadMaterialBloom__15OceanRingDrawerCFv | :x: |
|
||||
| loadMaterialBloom__15OceanRingDrawerCFv | :white_check_mark: |
|
||||
| GDBegin | :x: |
|
||||
| GDOverflowCheck | :x: |
|
||||
| GDWrite_f32 | :x: |
|
||||
|
@ -208,8 +208,8 @@ namespace MR {
|
||||
return (rhs + lhs) - sub;
|
||||
}
|
||||
|
||||
inline f32 divideFromSum(f32 lhs, f32 rhs, f32 div) {
|
||||
return (lhs + rhs) / div;
|
||||
inline f32 divideFromDiff(f32 lhs, f32 rhs, f32 div) {
|
||||
return (lhs - rhs) / div;
|
||||
}
|
||||
|
||||
inline f32 modAndAdd(f32 a1, f32 a2) {
|
||||
|
@ -217,9 +217,6 @@ void OceanRingDrawer::loadMaterial() const {
|
||||
GXSetClipMode(GX_CLIP_ENABLE);
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
/* float regswaps are the worst */
|
||||
/* is equiv other then that */
|
||||
void OceanRingDrawer::loadMaterialBloom() const {
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_POS_XYZ, GX_F32, 0);
|
||||
@ -247,18 +244,14 @@ void OceanRingDrawer::loadMaterialBloom() const {
|
||||
GXSetNumIndStages(0);
|
||||
TVec3f zDir = MR::getCamZDir();
|
||||
f32 v6 = ((MR::clamp(zDir.y, -0.2f, 0.1f) - -0.2f) / 0.30000001f);
|
||||
f32 depth = WaterAreaFunction::getCameraWaterDepth();
|
||||
f32 v8 = MR::clamp(depth, 150.0f, 300.0f);
|
||||
f32 val = 150.0f;
|
||||
f32 v9 = v8 - val;
|
||||
v9 = v9 / val;
|
||||
//f32 v9 = MR::divideFromSum(v8, 150.0f, 150.0f);
|
||||
f32 v8 = MR::clamp(WaterAreaFunction::getCameraWaterDepth(), 150.0f, 300.0f);
|
||||
f32 v9 = MR::divideFromDiff(v8, 150.0f, 150.0f);
|
||||
|
||||
if (v6 >= v9) {
|
||||
v9 = v6;
|
||||
v9 = v9;
|
||||
}
|
||||
else {
|
||||
v9 = v9;
|
||||
v9 = v6;
|
||||
}
|
||||
|
||||
f32 v18 = (150.0f + (105.0f * v9));
|
||||
@ -285,4 +278,3 @@ void OceanRingDrawer::loadMaterialBloom() const {
|
||||
GXSetCullMode(GX_CULL_NONE);
|
||||
GXSetClipMode(GX_CLIP_ENABLE);
|
||||
}
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user