Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moved gfx effects to the gpu and removed LoadTexByName on some textures #116

Closed
wants to merge 2 commits into from

Conversation

KiritoDv
Copy link
Contributor

No description provided.

Copy link
Collaborator

@Kenix3 Kenix3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge pending approval from @Emill

Copy link
Contributor

@Emill Emill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To support different "colours" and intensities, we could have a separate rdp colour that can be set, just like for example the env colour.

Whenever the grey filter is enabled, the intensitiy is calculated by (r+g+b)/3 and this scalar is then multiplied by the greying colour vector.

Then we don't need the GFXEffects enum, since a bool is sufficient.

@@ -99,6 +99,7 @@ extern "C"
extern u32 gGsFlagsMasks[4];
extern u32 gGsFlagsShifts[4];
extern void* gItemIcons[0x82];
extern u8 gItemAgeReqs[];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tabs vs spaces?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohh i didnt notice that, its vs fault, for some reason the indentation its wrong

@Kenix3
Copy link
Collaborator

Kenix3 commented Apr 7, 2022

To support different "colours" and intensities, we could have a separate rdp colour that can be set, just like for example the env colour.

Whenever the grey filter is enabled, the intensitiy is calculated by (r+g+b)/3 and this scalar is then multiplied by the greying colour vector.

Then we don't need the GFXEffects enum, since a bool is sufficient.

@KiritoDv please see @Emill's comments

@@ -2448,8 +2449,13 @@ static void gfx_run_dl(Gfx* cmd) {

//if (texPtr != NULL)
//gfx_dp_set_texture_image(C0(21, 3), C0(19, 2), C0(0, 10), texPtr);
break;
}
case G_SET_GFX_EFFECT:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

White space

@@ -341,6 +341,11 @@ static struct ShaderProgram* gfx_opengl_create_and_load_new_shader(uint64_t shad
append_line(fs_buf, &fs_len, "texel.a *= floor(clamp(random(vec3(floor(gl_FragCoord.xy * (240.0 / float(window_height))), float(frame_count))) + texel.a, 0.0, 1.0));");
}

if(cc_features.opt_grayscale) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

White space

@KiritoDv KiritoDv closed this Apr 25, 2022
MelonSpeedruns pushed a commit to MelonSpeedruns/Shipwright that referenced this pull request Jun 13, 2022
Malkierian pushed a commit to Malkierian/Shipwright that referenced this pull request Nov 20, 2023
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.

4 participants