Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - MichaelJPCT

Pages: 1 ... 4 5 [6] 7 8 ... 10
76
Support / Re: default shader lighting problem
« on: August 29, 2016, 10:02:12 am »
great! thanks!
will you fix it based on the version with correct camera nearclip/farclip/fov settings?

77
Support / Re: default shader lighting problem
« on: August 29, 2016, 09:44:43 am »
i found it was setSpecularLighting(true) that cause the problem.
but even if specpow=0 specterm=0 , the problem is still there.
here is a screenshot without specular.

78
Support / default shader lighting problem
« on: August 29, 2016, 04:13:03 am »
i have a JPCT app ported to JPCT-AE. i see a grey object with default shader has color problem. its faces are either grey or total black according to light direction, look like very much overbrighted.
my device has PowerVR540 GPU and Android 4.2.2.
what could be the cause?

79
my approach is just using projective texture, except the receiver is a seperate small simple  object3d instead of a large complex object3d.
i found i could clear the alpha channel of rtt by a full window quad mesh with shader: gl_fragcolor=vec4(0,0,0,0)
then i can draw opaque object in the rtt.
using shader to render the receiver without alpha information can work too.

80
Support / trying to make fake shadow with RTT texture applied to a mesh
« on: August 20, 2016, 05:34:56 pm »
i am trying to make fake shadow. my approach is like this:
stick a transparent mesh on an object3D which should be a shadow receiver, but in fact the transparent mesh is the receiver;
render the shadow caster object into a texture and project the texture onto the transparent mesh;
the RTT should have alpha information - the part covered by shadow caster is opaque and black, other part is fully transparent.

now i wonder how to render into the alpha channel of RTT texture - i want to use openGL hardware framebuffer for the RTT task (faster) so the texture should be directly used in GPU (not downloaded for further process).
is setAsShadowMap() meant for this?

81
Support / Re: fog formula?
« on: August 19, 2016, 09:10:43 am »
i found the fixed function pipeline just uses linear fog. any other curve that i tried doesn't match in the render result.

82
Support / fog formula?
« on: August 18, 2016, 06:53:59 pm »
some parts of my scene are rendered with shader while some are not.
i need to know the formula of fog in GL's fixed function rendering and use it in shader so that all parts in the scene have the same fog effect.
i use these settings on the parts without shader:
setFogging(1);
setFoggingMode(1);
setFogParameter(100f,20000f, r,g,b)

83
Support / Re: get unloadTexture flag?
« on: August 17, 2016, 03:19:30 am »
because i have some large textures that i want to unload in a certain condition, and don't want them to be loaded accidentally.
i can write code like this:
if (Texture.isLoaded(frameBuffer)) TextureManager.unloadTexture(frameBuffer, texture);
but , i have other way : i can hide the object3d that has the texture, then the texture won't be loaded accidentally. so it's OK without knowing the flag.

84
Support / Re: get unloadTexture flag?
« on: August 16, 2016, 08:28:46 pm »
an unloaded texture is loaded again automatically when the object3d is rendered. this is not easily known by the  application, but the engine knows it , right?

85
Support / get unloadTexture flag?
« on: August 16, 2016, 05:46:43 pm »
i think it's good that TextureManager has a flag indicating whether a texture is loaded/unloaded, if one needs to strictly manage texture memory usage.

86
Support / Re: alpha channel in image file?
« on: August 14, 2016, 02:25:49 pm »
ok i found out i need to use a constructor of Texture() that has useAlpha parameter , it works now.

87
Support / alpha channel in image file?
« on: August 14, 2016, 02:12:20 pm »
i have a texture which is supposed to act like a mask - some part see through, some part masked - think of 1-bit alpha.
i tried with setTransparencyMode(0) , the result is close, but in JPCT i have to use black color for the see-through part, which doesn't work for me - i need the see-through part to be blue, because there is a little edge area of the texture still visible.
i tried to use image file with transparency information - transparent png and 32-bit TGA. the png transparency doesn't work and tga can't be loaded.
what else can i try?

88
Support / Re: is there Z-offset options?
« on: August 14, 2016, 01:56:31 pm »
i want Z-offset (or depth-offset) to help resolve 2 (nearly) co-planar polygons, one should be seen , the other should be hidden. although moving one of them a little closer can have effect, but with Z-offset the result can be better in some cases.

89
Support / is there Z-offset options?
« on: August 14, 2016, 01:07:17 pm »
i couldn't find any.

90
Feedback / Re: hotspot JVM garbage collection strategy?
« on: August 14, 2016, 12:51:08 pm »
i do have a dynamic sleep system, i haven't noticed gc slowdown yet - my current average CPU time is at about 30%, but i am afraid when the program gets more complicated and CPU time gets to 70% or more, gc may be noticeable.
and it can cause more trouble if i have multiplayer features - lost of data sync & prediction error. it's a far future for me though.
i have quad-core CPU, i hope the parallel gc is real good.
thanks anyway.

Pages: 1 ... 4 5 [6] 7 8 ... 10