Hello Guest

Recent Posts

Pages: [1] 2 3 ... 10
1
Support / FloydSteinbergDithering bug
« Last post by dilshod on February 13, 2017, 07:49:14 AM »
Hi,
In the FloydSteinbergDithering script, i found lines:
Code: [Select]
case TextureFormat.RGB565:
quantShiftR = 5;
quantShiftB = 6;
quantShiftG = 5;
quantShiftA = 0;
break;

imho, it should be:
Code: [Select]
case TextureFormat.RGB565:
quantShiftR = 3;
quantShiftB = 3;
quantShiftG = 2;
quantShiftA = 0;
break;
2
Releases / Re: 2D Toolkit 2.5.7
« Last post by lolpolice on February 09, 2017, 03:09:15 PM »
Thankyou :)
3
Support / Re: SetDirty cannot be used during play mode.
« Last post by unikronsoftware on February 07, 2017, 11:54:17 AM »
I am still investigating this to figure out why it was doing it in the first place. Will get back to you this week.
4
Support / Re: SetDirty cannot be used during play mode.
« Last post by NMD on February 06, 2017, 10:20:19 PM »
So, we were on 5.4 and somehow the update to 5.5 fixed this.
5
Support / Re: Auto scale: Height - scales width as well
« Last post by unikronsoftware on February 06, 2017, 01:58:38 PM »
Hi there,

This doesnt make sense - you recompiled exactly the same code and it worked?
6
Support / Re: Auto scale: Height - scales width as well
« Last post by Flink on February 06, 2017, 06:35:21 AM »
Re-compiled the tk2d camera code and seems to work now...
7
Support / SetDirty cannot be used during play mode.
« Last post by NMD on February 05, 2017, 11:33:13 PM »
Hello,

Recently updated 2dtk and am getting this error...

To updated 2dtk, like I usually do, I made a new scene, imported 2dtk, and rebuild index.

Code: [Select]
InvalidOperationException: This cannot be used during play mode.
UnityEditor.SceneManagement.EditorSceneManager.MarkSceneDirty (Scene scene) (at C:/buildslave/unity/build/artifacts/generated/common/editor/EditorSceneManagerBindings.gen.cs:156)
tk2dUtil.SetDirty (UnityEngine.Object object) (at Assets/[Vendor]/TK2DROOT/tk2d/Code/tk2dUtil.cs:128)

It's coming after an assignment to tk2dbasesprtie.sortingOrder.

I found another post about that particular function(tk2dUtil.SetDirty), but it does not seem to apply here. Thanks!
8
Support / Auto scale: Height - scales width as well
« Last post by Flink on February 02, 2017, 02:31:41 PM »
Hi there,

A quick little question here about the camera override thing.
As I understand, I have a wildcard camera override set to auto-scale: fit height. So it will always keep the same height and potentially overflow on the sides, not scale. Is this the expected behavior?
Either way, now it seems like it matches the height but then scales the width to match the horizontal resolution on resolutions with a smaller width than the native resolution. And it seems to work in the editor, but on real hardware, it works well on iPhone5 but not on iPad2. This is not how it should behave right, or am I doing something wrong?

Thanks!
9
Support / Weird Shader bug in tk2d?
« Last post by Serge on January 31, 2017, 09:16:32 PM »
Hey, i've encountered a weird shader bug in the BlendVertexColor shader.

Reproduction steps:

Have a plain white sprite (255,255,255) with alpha 255. On top of that, display a black sprite (0, 0, 0) with 128 alpha. As a result i would expect a gray tone, 128, 128, 128.
But what i get is a blueish gray tone of 107, 114, 125. (not sure if the blue unity background is shining throught or so)

I had a look into the shader code but couldn't determine whats wrong there.

edit:
Ok i had a look into Unity's own sprite shader and think i found a way to have the shader work properly:

Set Blend to:
Blend One OneMinusSrcAlpha

and

Code: [Select]
fixed4 frag_mult(v2f_vct i) : SV_Target
{
fixed4 col = tex2D(_MainTex, i.texcoord) * i.color;
  col.rgb *= col.a;
return col;
}

seems to deliver the expected results.
10
Support / tk sprite and lighting
« Last post by mox on January 31, 2017, 09:11:30 PM »
Can you help me with understanding of something:

sprite collection, settings, premultiplied alpha not checked, normals only generation.
sprites on scene: atlas0 - LitBlendVertexColor.

If I create a sprite, add point light, sprite gets lit by the point light perfectly. Sprite transform:position x, y, z =0, rotation: 0, 0, 0, scale: 1, 1, 1

If I add the sprite to static sprite batcher, sprite gets black / unlit. I notice the scale is 1, 1, 0 ! If I remove the sprite from static sprite batcher it stays black/unlit. If I correct the scale to 1, 1, 1 Sprite is illuminated again properly. If I correct the scale of static sprite batcher to 1, 1, 1 sprites again get illuminated.

Can you explain what is exactly happening here? What is the correct way to setup tk2d batched sprites for usage of dynamic (point) lighting?

Thanks in advance!
Pages: [1] 2 3 ... 10