Giter VIP home page Giter VIP logo

Comments (2)

rdb avatar rdb commented on May 30, 2024

I don't think this phrase is right in your issue description: "the default texture-stage is always available". Maybe I misunderstood what you mean, but to the renderer / shader, the default texture stage is treated no differently than any other, and it's not present if there's no texture assigned.

So, I'm still on the fence about this. It feels weird to me to have the default stage's texture matrix applied, and then suddenly disappear when you add a texture to even a non-default texture stage. On the other hand, it is also fairly harmless. But we'd also have to apply it to other inputs that may be specified on a per-stage basis.

I'm wondering if we should have a way to explicitly say that a texture matrix is meant to be a fallback intended for all texture stages without an explicit texture matrix assigned.

Another way to solve your problem is to give you a way to explicitly bind to the texture matrix of the default texture stage, such as with a p3d_DefaultTextureMatrix input or similar.

from panda3d.

ArsThaumaturgis avatar ArsThaumaturgis commented on May 30, 2024

I don't think this phrase is right in your issue description: "the default texture-stage is always available". Maybe I misunderstood what you mean, but to the renderer / shader, the default texture stage is treated no differently than any other, and it's not present if there's no texture assigned.

Hmm... I suppose that, from my perspective as a dev using the texture-stage, it appears to be "always available": it's always accessible via "TextureStage.getDefault()", and operations that use it (such as texture-offsets) always seem to accept it.

It feels, intuitively, like doing something with the "default" texture-stage should be reflected.

So, I'm still on the fence about this. It feels weird to me to have the default stage's texture matrix applied, and then suddenly disappear when you add a texture to even a non-default texture stage.

That would be odd--but also unexpected? Would a texture-matrix derived from a non-default texture-stage not appear in one of the other slots in the array of matrices? (i.e. Not in "p3d_TextureMatrix[0]", but rather in "p3d_TextureMatrix[1]", or "p3d_TextureMatrix[2]", etc.?)

I'll admit that I seldom used other texture-stages myself, so I'm not all that familiar with how they're handled...

I'm wondering if we should have a way to explicitly say that a texture matrix is meant to be a fallback intended for all texture stages without an explicit texture matrix assigned.

Hmm... That could work.

I'm tempted to suggest that this be the new purpose of the "default" texture-stage--after all, it is a "default"--but that would likely break extant code. And a lot of it.

Another way to solve your problem is to give you a way to explicitly bind to the texture matrix of the default texture stage, such as with a p3d_DefaultTextureMatrix input or similar.

Ah, this is an interesting solution--I like it!

It should do the job, and be fairly intuitive, and not break anything already implemented! ^_^

from panda3d.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.