Skip to content

Update ComputeShader.hx#8

Open
e2002e wants to merge 1 commit into
armory3d:mainfrom
e2002e:main
Open

Update ComputeShader.hx#8
e2002e wants to merge 1 commit into
armory3d:mainfrom
e2002e:main

Conversation

@e2002e

@e2002e e2002e commented Jun 12, 2026

Copy link
Copy Markdown

Hello @luboslenco,
one small fix so that the voxels keep working.

@e2002e

e2002e commented Jun 12, 2026

Copy link
Copy Markdown
Author

Very important:

Kore/Backends/Graphics4/OpenGL/Sources/kinc/backend/graphics4/rendertarget.c.h:362

void kinc_g4_render_target_use_color_as_texture(kinc_g4_render_target_t *renderTarget, kinc_g4_texture_unit_t unit) {
for (int i = 0; i < KINC_G4_SHADER_TYPE_COUNT; ++i) {
if (unit.stages[i] >= 0) {
glActiveTexture(GL_TEXTURE0 + unit.stages[i]);
glCheckErrors();
glBindTexture(renderTarget->isCubeMap ? GL_TEXTURE_CUBE_MAP : GL_TEXTURE_2D, renderTarget->impl._texture);
glCheckErrors();
}
}
}

void kinc_g4_render_target_use_depth_as_texture(kinc_g4_render_target_t *renderTarget, kinc_g4_texture_unit_t unit) {
for (int i = 0; i < KINC_G4_SHADER_TYPE_COUNT; ++i) {
if (unit.stages[i] >= 0) {
glActiveTexture(GL_TEXTURE0 + unit.stages[i]);
glCheckErrors();
glBindTexture(renderTarget->isCubeMap ? GL_TEXTURE_CUBE_MAP : GL_TEXTURE_2D, renderTarget->impl._depthTexture);
glCheckErrors();
}
}
}

Otherwise textures can't bind.

@e2002e

e2002e commented Jul 5, 2026

Copy link
Copy Markdown
Author

@luboslenco, just so as you don't think this is maybe not a good idea to change Kore,
The fix proposed in the comment is basically the change that was in my pinned Kinc repo these last years.
I think there was some kind of regression or rollback when going from Kinc to Kore and the fix has been lost.
I cannot contact robert from Kode nor fork Kore in any way because I have been banned.
That is why I'm giving the code as is in the comments.

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.

1 participant