Jump to content

[1.12.2] Trying to render a texture as an overlay to a block in world fails


Recommended Posts

Posted

I am trying to render a transparent texture over specific in world blocks whenever an item is held. Due to previous work, i can put a box of lines around it, but as soon as I start with textures, and the needed changes, it fails

 

https://github.com/Thaumic-Tinkerer/ThaumicTinkerer/blob/1.12/src/main/java/com/nekokittygames/thaumictinkerer/client/rendering/special/TransvectorRendering.java is the code in question.

I have only started with the first face, to make debugging easier currently.

This is the result I get always:

unknown.png

A plain white square over the face where I should get this texture:

mark.png

overlayed on the block underneath.

Is there anything obvious I am missing here?

Posted

Not sure if this is the cause, but you enabled texture 2D, then immediately disabled it here.

  • Like 1

Some tips:

  Reveal hidden contents

 

Posted
  On 9/16/2019 at 2:39 AM, DavidM said:

Not sure if this is the cause, but you enabled texture 2D, then immediately disabled it here.

Expand  

Honestly that's leftover code from where I sourced the original line drawing varient, drawOutlineTextured acts the same if I enableTexture2D inside or not

Posted (edited)

Have you bind your texture? I am dumb.

Edited by DavidM
  • Like 1

Some tips:

  Reveal hidden contents

 

Posted
  On 9/16/2019 at 9:05 AM, DavidM said:

I am dumb.

Expand  

I don't think so. I also don't see the texture being bound. @nekosune Passes a TextureAtlasSprite(RenderEvents.MARK_SPRITE) to his drawTexturedOutline, but never binds that texture.

  • Like 1

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted
  On 9/16/2019 at 2:31 PM, Animefan8888 said:

I don't think so. I also don't see the texture being bound. @nekosune Passes a TextureAtlasSprite(RenderEvents.MARK_SPRITE) to his drawTexturedOutline, but never binds that texture.

Expand  

Even with trying to bind any texture , rather then just using the atlas,  like here: https://github.com/Thaumic-Tinkerer/ThaumicTinkerer/blob/e740e94ca431a1dc6d2c04a004e570b1505cceb4/src/main/java/com/nekokittygames/thaumictinkerer/client/rendering/special/TransvectorRendering.java#L77

I still get the exact same error...

Posted
  On 9/16/2019 at 2:31 PM, Animefan8888 said:

I don't think so. I also don't see the texture being bound. @nekosune Passes a TextureAtlasSprite(RenderEvents.MARK_SPRITE) to his drawTexturedOutline, but never binds that texture.

Expand  

I think that OP stitched the texture during TextureStitchEvent, and then use TextureAtlasSprite#getInterpolatedU and V to obtain the UV of the stitched sprite to be used in the buffer builder.

The texture binded is still the original texture map, but it contains the stitched texture.

Some tips:

  Reveal hidden contents

 

Posted
  On 9/17/2019 at 12:35 AM, DavidM said:

I think that OP stitched the texture during TextureStitchEvent, and then use TextureAtlasSprite#getInterpolatedU and V to obtain the UV of the stitched sprite to be used in the buffer builder.

The texture binded is still the original texture map, but it contains the stitched texture.

Expand  

That's exactly what I was doing, it turns out disabling and renabling texture 2D was confusing things, removing that helped fix things

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • A few months ago, I was approached online by a so-called investment broker. Everything looked professional — flashy websites, fake but convincing reviews, even video calls with people who seemed legitimate. They promised unbelievable returns on Bitcoin investments, and I, eager to grow my crypto holdings, fell for it. Over a few weeks, I transferred Bitcoin worth around $360,000 to what I thought was a secured investment wallet. The “broker” kept assuring me my money was growing, even showing fake dashboards with fabricated profits. But when I tried to withdraw my funds, they demanded additional fees — taxes, account, activation, and release charges. That’s when the truth hit me I had been scammed. Devastated, I started searching for solutions. But then, a glimmer of hope. A cybersecurity contact muttered Try Dexdert Net Recovery. They hunt crypto ghosts. Dexdert Net had real testimonials, detailed explanations of their process, and most importantly, they didn’t ask for any suspicious upfront fees. After contacting them, their team patiently walked me through the steps gathering all evidence of the scam, tracking the Bitcoin transactions on the blockchain, and using legal recovery channels and cyber forensic methods. They kept me updated at every stage. 4 days later, I got the email I’ll never forget: Funds Recovered. Dexdert Net Recovery successfully trace and retrieve the entire $360,000 worth of Bitcoin from the scammer’s wallets. Thanks to Dexdert Net Pro Recovery, not only did I reclaim my lost Bitcoin, but I also regained a sense of justice — and a serious lesson learned. If you’re ever in a situation like I was, know this: there’s hope, and there are real experts out there who can help. Dexdert Net Recovery proved it to me. CONTACT DEXDERT NET RECOVERY VIA INFORMATION BELOW   Telegram: (@Dexdertprorecovery)      
    • So I just try to remove mods and see what works?
    • Hello, I want to change some things about a specific mod. I made some small mods for myself before, but I don't know how to use other mods as a dependencie and add the repositories. My build.gradle file looks something like this:   repositories { flatDir { dirs 'libs' } } dependencies { minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}" implementation fg.deobf("libs:create-1.20.1:0.5.1.f") implementation fg.deobf("libs:create-stuff-additions1.20.1:2.0.4a") } I have the folder libs in my root folder. If I start the gradlew.exe, I get the following output: > Configure project : Java: 17.0.15, JVM: 17.0.15+6 (Eclipse Adoptium), Arch: amd64 files(...) dependencies are not deobfuscated. Use a flatDir repository instead: https://docs.gradle.org/current/userguide/declaring_repositories.html#sub:flat_dir_resolver Cannot deobfuscate dependency of type DefaultSelfResolvingDependency_Decorated, using obfuscated version! files(...) dependencies are not deobfuscated. Use a flatDir repository instead: https://docs.gradle.org/current/userguide/declaring_repositories.html#sub:flat_dir_resolver Cannot deobfuscate dependency of type DefaultSelfResolvingDependency_Decorated, using obfuscated version! I don't know why this warning occurs or how to fix it. If I try to build the whole thing, I get the same message, but this time as an error and the build process crashes. I looked at the gradle dependencies website (https://docs.gradle.org/current/userguide/dependency_management_for_java_projects.html), but everything I tried did not work.   I use the Minecaft version 1.20.1 and the Forge version 47.2.17. Both mods don't have other dependencies and work perfectly fine if I start the game normaly.   Can someone explain to me why it does not work and/or where I can get help? Something like a documentation would be enough.
    • im just going to play without shaders(my friends will be dissapointed)
    • crashed the game // Embeddium instance tainted by mods: [oculus] // Please do not reach out for Embeddium support without removing these mods first. // ------- // Why did you do that? flywheel is needed for oculus but when i go into mc it then says sodium is 0.5.3(rubidum fork of sodium ported to forge)
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.