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

even more sharper textures than r_roundimagedown 0 and r_picmip 0 #154

Open
WhiteMagicRaven opened this issue Jan 10, 2023 · 1 comment
Open

Comments

@WhiteMagicRaven
Copy link

This can be archieved if engine will use OpenGL extension
GL_ARB_texture_non_power_of_two or similar (in case its not ARB)

This extensions is sign that video card can load textures in any size.
In case with this game or any q3 engine it bypass ResampleTexture function that causes blur on textures by scaling them.

ust for quick reference

if (GL_ExtensionSupported( "GL_ARB_texture_non_power_of_two" )
{
scaled_width=width;
// this will disable usage of ResampleTexture function that is not perfectly resizing textures. Video card will support non power of two textures directly.
scaled_height=height;
// that is how i done it before in just plain q3 it been a while ago if i recall correctly.
}
else
{
for (scaled_width = 1 ; scaled_width < width ; scaled_width<<=1)
;
for (scaled_height = 1 ; scaled_height < height ; scaled_height<<=1)
;
}

so basicly any textures from game will be uploaded in untouched state to video card (if r_roudimagedown 0 and r_picmip 0)
can't provide screenshots, i remember some source ports uses this extension.
This leads to completely abandon usage of ResampleTexture function (if r_roudimagedown 0 and r_picmip 0) making them sharper as video card support them natively, in any case ResampleTexture doing it worse than video card, and it makes blur.

@aufau
Copy link
Member

aufau commented Mar 1, 2023

Which jk2 textures are npot and would benefit from this?

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

No branches or pull requests

2 participants