Problems with default graphics target on Windows 11
smallfx opened this issue · 2 comments
Describe the bug
Example code here: https://github.com/smallfx/kha_issues
I am on Windows 11, and I'm experiencing some weirdness with the default graphics targets when compiling for Windows.
Anecdotally this was also observed on Windows 10 after upgrading to a recent version of Kha, although I can't test that anymore because I upgraded to 11.
For the default graphics target, drawing images with g2
is blurry despite bilinear
being set to false on the g2
.
(There is a slight darkening effect which is demonstrated here as a contrast to the OpenGL problem detailed below.)
(It should also be noted that I am using a custom g2
(aptly named CustomG2
) to more closely replicate my engine's setup and to have a custom useCanvas
function. In my engine it is also used to add additional things to the vertex structure by default, etc.)
To Reproduce
Steps to reproduce the behavior:
- Be on Windows (I am on Windows 11)
- In CMD or Windows Terminal,
cd
to thekha_issues
cloned git repo directory. - Run
node <KHA_DIRECTORY>\Tools\khamake\khamake.js --run
- Witness the following behavior (bilinear filtering despite
bilinear
being false inCustomG2
and thus usingPointFilter
)
(NOTE: the darkening effect here is desired. It is related to another issue for which the examplekha_issues
git repo is also used)
Expected behavior
It is expected that the image would be rendered with the PointFilter
and not be bilinearly-filtered.
Execution Environment:
- Host system (where you compile your code): Windows 11
- Target system (where you run your code): Windows 11 (same machine)
- IDE used (if any): vim
- Kha revision: latest ( commit hash 2a4fbae )
- Kha build output (Using Kha...):
Creating Kha project.
Exporting asset 1 of 1 (chests.png).
Compiling shader 1 of 1 (game-processing.frag.glsl).
Compiling shader 1 of 8 (painter-colored.frag.glsl).
Compiling shader 2 of 8 (painter-colored.vert.glsl).
Compiling shader 3 of 8 (painter-image.frag.glsl).
Compiling shader 4 of 8 (painter-image.vert.glsl).
Compiling shader 5 of 8 (painter-text.frag.glsl).
Compiling shader 6 of 8 (painter-text.vert.glsl).
Compiling shader 7 of 8 (painter-video.frag.glsl).
Compiling shader 8 of 8 (painter-video.vert.glsl).
Using Kinc (git-error) from C:\Users\jaxyn\Documents\GAMEDEV\Kha\Kinc
kincfile found.
Creating Windows project files.
Compiling...
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.0.2
** Copyright (c) 2021 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
.NET Framework ���� Microsoft (R) Build Engine �o�[�W���� 17.0.0+c9eb9dd64
Copyright (C) Microsoft Corporation.All rights reserved.
Build time: 0m 39s
Starting Kinc
Initializing a new default audio device.
Falling back to the system's preferred WASAPI mix format.
Starting application
- Application output (if it runs): no output, it just runs.
Hu, can't reproduce that, works fine for me. Why is the build output printing Using Kinc (git-error)
?
@RobDangerous This question made me dig a bit deeper and tl;dr: I fixed the issue by actually properly re-cloning the entire Kha repo.
The git-error
is because I was running it from Windows Terminal which doesn't have access to my Windows git stuff.
If I run it from the git-bash shell, that line turned into this:
Using Kinc (d5cb7ce4) from C:\Users\jaxyn\Documents\GAMEDEV\Kha\Kinc
Which I understood is not the version used in the current version of the Kha main
branch.
So I spent a little bit of time figuring out why my submodules seemed to be out of sync and... now everything is totally fixed and the point filtering works as expected.
Sorry for the entirely-my-fault issues! 😅
Thanks for following up quickly on them regardless!