jPCT - a 3d engine for Java > Support

Environment Mapping with Software

<< < (2/3) > >>

EgonOlsen:
About the PolyLine in software mode: I've no plans to add support for this, I'm afraid.

AGP:
I'll try the setBlending thing and report back.

Why not? Academically, you have to agree that there should be no difference between what each renderer can render.

AGP:
So I wrote prepareForSoftware() as follows. Trouble is I'm sensing that the order of the operations is wrong. It's currently going:


--- Code: --- texInfo = new TextureInfo(tm.getTextureID("EnvironmentMap"));
texInfo.add(tm.getTextureID("Starfighter.png"), TextureInfo.MODE_ADD_SIGNED); //MODE_ADD, MODE_BLEND, MODE_MODULATE, MODE_ADD_SIGNED

--- End code ---
in the constructor. Then, once it's been established that the renderer in use is software:


--- Code: ---     public void prepareForSoftware() {
TextureManager.getInstance().addTexture("GreyBump", new  Texture(1024, 1024, new java.awt.Color(128, 128, 128)));
body.setBlending(true);
texInfo.add(TextureManager.getInstance().getTextureID("Starfighter.png"), TextureInfo.MODE_ADD_SIGNED);
texInfo.add(TextureManager.getInstance().getTextureID("GreyBump"), TextureInfo.MODE_ADD_SIGNED);
     }

--- End code ---

No go. On the other hand:


--- Code: ---     public void prepareForSoftware() {
TextureManager.getInstance().addTexture("GreyBump", new  Texture(1024, 1024, new java.awt.Color(128, 128, 128)));
body.setBlending(true);
texInfo = new TextureInfo(TextureManager.getInstance().getTextureID("Starfighter.png"));
texInfo.add(TextureManager.getInstance().getTextureID("EnvironmentMap"), TextureInfo.MODE_ADD_SIGNED);
texInfo.add(TextureManager.getInstance().getTextureID("GreyBump"), TextureInfo.MODE_ADD_SIGNED);
body.setTexture(texInfo);
     }

--- End code ---
produces a very similar effect to my combineAmbientAndDiffuse() method (the diffuse information is not in the right place but the environment map, tinted by the diffuse color, behaves right).

EgonOlsen:
I'm not sure what you mean. Do you have  a screen shot of how it looks like and how it's supposed to look like?

AGP:
I'll send it to you as soon as possible, via email.

Would you as least show me how I could do Polyline so that my lines would take the depth buffer in consideration (as it stands, my little hack gets drawn over everything)?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version