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 2 3 [4] 5 6 ... 18
46
Support / Re: clearAll option of setRenderTarget doesn't work?
« on: November 02, 2020, 09:00:22 am »
it works , thanks.

another problem i encounter again is the wrong scaling of blitting , when the target texture is of different size from the real fb.
the blitting system thinks the texture is the same size as real fb, so i need to scale again. for now i can make a scaling function to solve it.
the current api would confuse new users, sometimes it's hard to figure out what is wrong, i encountered that several years ago.
i think the best solution is to use normalized value for positioning if the engine provides a widely compatible api.

47
Support / Re: clearAll option of setRenderTarget doesn't work?
« on: November 01, 2020, 07:07:00 pm »
the question is not about the color , but about the border of texture being cleared , when clearAll option is set to false,
while the java doc says otherwise.

anyway, now i use blitting (from a pure color texture) to replace clearing.

48
Support / clearAll option of setRenderTarget doesn't work?
« on: November 01, 2020, 08:17:09 am »
fb.setRenderTarget(tex,9,9,9,9,false); fb.clear(0xffff);

with the above code, the whole texture turns blue, why?
tested on powervr 6250.

49
Support / getRenderTarget method?
« on: November 01, 2020, 05:24:12 am »
Hi Egon,
i thought of a situation which i am not sure is necessary at all, that temporarily switching the render target.
if that happens, a getRenderTarget method can ease the problem of (the engine user) keeping track which texture is the current target.
like this:
b=getRenderTarget();
setRenderTarget(a);
render something;
setRenderTarget(b);

but if the engine doesn't call setRenderTarget, only the app code call it, then the user can use a global variable to keep track of the target texture. then getRenderTarget is unnecessary.
and temporarily switching render target might be a wrong thing to do.

50
Support / Re: can GL ES 3.0 be supported?
« on: September 15, 2020, 09:45:31 pm »
i see, thanks.

51
Support / can GL ES 3.0 be supported?
« on: September 12, 2020, 07:07:19 am »
i found some feature of es3.0 that i like to have, such as occlusion query (a better object3d.wasVisible() function)
is it possible to enable es3.0?

52
Support / Re: about the speed of getPixels, GPU collision detection
« on: September 08, 2020, 09:02:03 am »
thank you Egon.
i am just exploring possibilities, i have little experience in collision detection.
overall i think using simplified mesh with JPCT's collision detection methods is the best solution.

53
Support / about the speed of getPixels, GPU collision detection
« on: September 06, 2020, 10:30:44 am »
hi Egon,
the java doc says getPixels costs a lot of time (for realtime rendering).
is the time related to the size of framebuffer?
if the framebuffer is of size 1x1, does it still cost that much time or is the time much shorter?
i think of using getpixels to do collision detection, is it possible?
the method is like this, place a camera at a bullet, set farclip to the distance that bullet travels in delta time, read the resulting depthbuffer to know whether/where/when the bullet hits something.
if this is possible, is it better or worse comparing to the ray-polygon collision detection in jpct engine?

54
Support / accessing sampler2D in vertex shader
« on: September 06, 2020, 10:10:58 am »
hi Egon,
if i write a shader with sampler2D only in vertex shader but not in fragment shader, (other thing are similar to default shader) will jpct prepare the texture for the shader?
this is because i use pure color texture on some objects, texture color doesn't vary.

55
Projects / Re: my project - Vehicle Simulation
« on: August 31, 2020, 10:36:47 pm »
one of the best screenshots i have so far. most recent 3D model,(i made dozens of models before this one , as practising)

56
Support / Re: Increase number of texture units
« on: August 25, 2020, 08:41:18 pm »
can you use while loop?
int i=lightcount; while (i>0) { do something; i--; }
i never used a loop though.
using variable in array seems fine for me. i did something like this:
 int i=int(position.x); position.x=uniform[i*3+1];

57
Support / Re: trying to get default shader code
« on: August 17, 2020, 01:01:14 pm »
then i 'd better add a limit at the output of fragment shader.
the output vertexcolor of vertex shader should not matter because it's just another varying value passing from vertex shader to fragment shader.

58
Support / Re: trying to get default shader code
« on: August 16, 2020, 06:41:48 am »
white limit was in default vertex shader. i removed that one.
in fragment shader a white limit can be added, i haven't though.
i tested on mali 450 and powerVR 6250, both results correct.

59
Support / Re: trying to get default shader code
« on: August 15, 2020, 08:13:01 pm »
i just removed the WHITE color restriction and multiplied the pow() output by a value larger than 1 (say 5 or 10).
fragment shader is not changed at all.
but the texture color can't be 0, or the result is still 0.
this is a simple method. not much research was done.
some other engines use more complex methods.

60
Support / Re: trying to get default shader code
« on: August 15, 2020, 11:28:19 am »
first thing i change is the specular effect.

Pages: 1 2 3 [4] 5 6 ... 18