Search Results

Search found 9439 results on 378 pages for 'color depth'.

Page 2/378 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • When does depth testing happen?

    - by Utkarsh Sinha
    I'm working with 2D sprites - and I want to do 3D style depth testing with them. When writing a pixel shader for them, I get access to the semantic DEPTH0. Would writing to this value help? It seems it doesn't. Maybe it's done before the pixel shader step? Or is depth testing only done when drawing 3D things (I'm using SpriteBatch)? Any links/articles/topics to read/search for would be appreciated.

    Read the article

  • Using ToArgb() followed by FromArgb() does not result in the original color

    - by hayrob
    This does not work int blueInt = Color.Blue.ToArgb(); Color fred = Color.FromArgb(blueInt); Assert.AreEqual(Color.Blue,fred); Any suggestions? [Edit] I'm using NUnit and the output is failed: Expected: Color [Blue] But was: Color [A=255, R=0, G=0, B=255] [Edit] This works! int blueInt = Color.Blue.ToArgb(); Color fred = Color.FromArgb(blueInt); Assert.AreEqual(Color.Blue.ToArgb(),fred.ToArgb());

    Read the article

  • Windows Color Calibrator Does Not Retain Color Settings

    - by Zian Choy
    When I try to calibrate the monitor using Windows 7's color calibrator, the monitor rejects changes to the color settings. For example, one of my monitors has a blueish tinge. If I click my mouse to tone down the blue and then let go of my mouse the monitor will go back to being blueish. At the moment, I am getting around the problem by using the color controls in the monitor's on screen displays. How can I get the color calibrator to work? Update: I tried checking the color settings in the ATI Radeon Catalyst Control Center and noticed that I can't do anything. The "Reactivate ATI color controls" button keeps flashing and any changes I try to make are discarded instantly.

    Read the article

  • Java OpenGL color material darkens when depth test is disabled

    - by Jeff Storey
    I've been working with the depth buffer in OpenGL (JOGL) to ensure certain items are rendered in front of others by disabling the depth buffer (detailed in my previous question http://stackoverflow.com/questions/2516086/java-opengl-saving-depth-buffer). This works, except when I set the color of an item that is being drawn when the depth test is disabled, none of the material shininess shows up. The item is rendered as a darker version of the original color (it seems like there is no lighting effect really applied to it). Is there a reason why this would be happening? and how might I prevent this? thanks, Jeff

    Read the article

  • C# Algorithm to Tint a Color a Certain Percent

    - by Josh Close
    I have a color and I want get a tint of that color by a certain percent. So 100% is the color itself, 90% is a slightly lighter color, etc. Basically, it's like adding 10% of opacity to the color, if the color is on a white background. I need to convert the color into a hex HTML color value, so I don't want transparency. Is there an algorithm to get a tint of the System.Drawing.Color RGB value?

    Read the article

  • Why are my scene's depth values not being written to my DepthStencilView?

    - by dotminic
    I'm rendering to a depth map in order to use it as a shader resource view, but when I sample the depth map in my shader, the red component has a value of 1 while all other channels have a value of 0. The Texture2D I use to create the DepthStencilView is bound with the D3D11_BIND_DEPTH_STENCIL | D3D11_BIND_SHADER_RESOURCE flags, the DepthStencilView has the DXGI_FORMAT_D32_FLOAT format, and the ShaderResourceView's format is D3D11_SRV_DIMENSION_TEXTURE2D. I'm setting the depth map render target, then i'm drawing my scene, and once that is done, I'm the back buffer render target and depth stencil are set on the output merger, and I'm using the depth map shader resource view as a texture in my shader, but the depth value in the red channel is constantly 1. I'm not getting any runtime errors from D3D, and no compile time warning or anything. I'm not sure what I'm missing here at all. I have the impression the depth value is always being set to 1. I have not set any depth/stencil states, and AFAICT depth writing is enabled by default. The geometry is being rendered correctly so I'm pretty sure depth writing is enabled. The device is created with the appropriate debug flags; #if defined(DEBUG) || defined(_DEBUG) deviceFlags |= D3D11_CREATE_DEVICE_DEBUG | D3D11_RLDO_DETAIL; #endif This is how I create my depth map. I've omitted error checking for the sake of brevity D3D11_TEXTURE2D_DESC td; td.Width = width; td.Height = height; td.MipLevels = 1; td.ArraySize = 1; td.Format = DXGI_FORMAT_R32_TYPELESS; td.SampleDesc.Count = 1; td.SampleDesc.Quality = 0; td.Usage = D3D11_USAGE_DEFAULT; td.BindFlags = D3D11_BIND_DEPTH_STENCIL | D3D11_BIND_SHADER_RESOURCE; td.CPUAccessFlags = 0; td.MiscFlags = 0; _device->CreateTexture2D(&texDesc, 0, &this->_depthMap); D3D11_DEPTH_STENCIL_VIEW_DESC dsvd; ZeroMemory(&dsvd, sizeof(dsvd)); dsvd.Format = DXGI_FORMAT_D32_FLOAT; dsvd.ViewDimension = D3D11_DSV_DIMENSION_TEXTURE2D; dsvd.Texture2D.MipSlice = 0; _device->CreateDepthStencilView(this->_depthMap, &dsvd, &this->_dmapDSV); D3D11_SHADER_RESOURCE_VIEW_DESC srvd; srvd.Format = DXGI_FORMAT_R32_FLOAT; srvd.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D; srvd.Texture2D.MipLevels = texDesc.MipLevels; srvd.Texture2D.MostDetailedMip = 0; _device->CreateShaderResourceView(this->_depthMap, &srvd, &this->_dmapSRV);

    Read the article

  • Android ListView with alternate color and on focus color

    - by Yogesh
    I need to set alternate color in list view rows but when i do that it removes/ disables the on focus default yellow background I tried with backgroundColor rowView.setBackgroundColor(SOME COLOR); also with backgrounddrwable. rowView.setBackgroundColor(R.drawable.view_odd_row_bg); <!-- Even though these two point to the same resource, have two states so the drawable will invalidate itself when coming out of pressed state. --> <item android:state_focused="true" android:state_enabled="false" android:state_pressed="true" android:drawable="@color/highlight" /> <item android:state_focused="true" android:state_enabled="false" android:drawable="@color/highlight" /> <item android:state_focused="true" android:state_pressed="true" android:drawable="@color/highlight" /> <item android:state_focused="false" android:state_pressed="true" android:drawable="@color/highlight" /> <item android:state_focused="true" android:drawable="@color/highlight" /> but it wont work. is there any way we can set background color and on focus color simultaneously which will work.

    Read the article

  • Day dreaming about automatic RGB color function in PHP

    - by Sam
    Hello fellow earthlings. A quesion about RGB color and its usefulness in a simple tiny php code: Imagine I have variable $colorA containning a valid six char color. say B1B100, a greenish natural color. Now If I would like to make a new color from that, which is, say, ten steps lighter thatn that original color, roughly. $colorA = B1B100 // original color php code with little color engine lightening stuff up goes here $colorB = ?????? // original color lightened up Is there a php ready function that KNOWS rgb colors something like php function RGB ( input color, what to do, output color) Where what to do could be +/- 255 values of brightness etc etc. Is something like this already possible or am I day dreaming? rgb($colorA, +10, $colorB) If this does not exist, what would be the shortest code for doing this? Link suffices. Suggestions and ideas are answers to me. Thanks.

    Read the article

  • Changing label color based on current label color in iPhone dev

    - by Matt Thomas
    I am having trouble figuring out the if statement code for changing the color of a UI label based on the current color of the label. For instance, if the label color is currently red and the correct button is pressed, I want the label color to change to black. If the label color is black I want the label color to change to blue. Many thanks for any tips.

    Read the article

  • Depth interpolation for z-buffer, with scanline

    - by Twodordan
    I have to write my own software 3d rasterizer, and so far I am able to project my 3d model made of triangles into 2d space: I rotate, translate and project my points to get a 2d space representation of each triangle. Then, I take the 3 triangle points and I implement the scanline algorithm (using linear interpolation) to find all points[x][y] along the edges(left and right) of the triangles, so that I can scan the triangle horizontally, row by row, and fill it with pixels. This works. Except I have to also implement z-buffering. This means that knowing the rotated&translated z coordinates of the 3 vertices of the triangle, I must interpolate the z coordinate for all other points I find with my scanline algorithm. The concept seems clear enough, I first find Za and Zb with these calculations: var Z_Slope = (bottom_point_z - top_point_z) / (bottom_point_y - top_point_y); var Za = top_point_z + ((current_point_y - top_point_y) * Z_Slope); Then for each Zp I do the same interpolation horizontally: var Z_Slope = (right_z - left_z) / (right_x - left_x); var Zp = left_z + ((current_point_x - left_x) * Z_Slope); And of course I add to the zBuffer, if current z is closer to the viewer than the previous value at that index. (my coordinate system is x: left - right; y: top - bottom; z: your face - computer screen;) The problem is, it goes haywire. The project is here and if you select the "Z-Buffered" radio button, you'll see the results... (note that the rest of the options before "Z-Buffered" use the Painter's algorithm to correctly order the triangles. I also use the painter's algorithm -only- to draw the wireframe in "Z-Buffered" mode for debugging purposes) PS: I've read here that you must turn the z's into their reciprocals (meaning z = 1/z) before you interpolate. I tried that, and it appears that there's no change. What am I missing? (could anyone clarify, precisely where you must turn z into 1/z and where to turn it back?)

    Read the article

  • Should I embed the sRGB color profile in JPEG files?

    - by basic6
    I have a large (growing) collection of scanned images. They are TIFF files, mostly 48 bit with the Adobe RGB color space. This color profile is integrated in the files. When such a file is opened in IrfanView (with plugins), it says (Image - Information) Adobe RGB 1998. "Normal images", like the JPG files from a digital camera, do not (necessarily) have a color profile integrated in the file. I understand that it's necessary to include the Adobe RGB profile in an image file which uses the Adobe RGB space, so the color values can be interpreted correctly. Here's a test image with a completely different color profile, programs that ignore the included profile (like MSIE8 or Gwenview) will render it as sRGB (?): I'm planning to convert my TIF files to JPG, so I'm wondering if there's anything wrong with using IrfanView that would save them as sRGB without embedding the sRGB profile. I've heard that images should always be saved with the color profile included. Since every image seems to be interpreted as sRGB by default (by software without color management), I don't understand why the sRGB profile should be included?

    Read the article

  • Getting Depth Value on Kinect SDK 1.6

    - by AlexanderPD
    this is my first try on Kinect and Kinect SDK so I'm having a lot of "newbie issues" :) my goal is to point my mouse on the Kinect standard video output and get the depth value. I already have both normal video and depth video outputs by using the 2 "Color Basic-WPF" and "Depth Basic-WPF" samples, and handling mouse events or position is not a problem. In fact i already did all and i already got a depth value, but this value is always HIGHLY imprecise. It jumps from 500 to 4000 by just moving to the next pixel in a plane surface. So.. I'm pretty sure I'm reading the depth value in the wrong way. This is how i read it: short debugValue = depthPixels[x*y].Depth; debug.Text = "X = "+x+", Y = "+y+", value = "+debugValue.ToString(); i know it's pretty out of context, this little piece of code is inside the same SensorDepthFrameReady function in "Depth Basic-WPF"! "x" and "y" are the mouse coordinates and depthPixels is DepthImagePixel[] type, a temporary array filled with the "depthFrame.CopyDepthImagePixelDataTo(this.depthPixels);" instruction. Depth frame is filled here: DepthImageFrame depthFrame = e.OpenDepthImageFrame() the "e" comes from here: private void SensorDepthFrameReady(object sender, DepthImageFrameReadyEventArgs e) and this last one is called here: this.sensor.DepthFrameReady += this.SensorDepthFrameReady; how i must handle that depth value i get? I know the value must be between 800 and 4000 but i get values between about 500 and about 8000. i already google a lot (here on SO too) and i still can't understand if the depth value is 11 or 13 bit. The sdk examples uses shrink this value to 8 bit and this is making even more confusion in my head :(

    Read the article

  • Interface builder background color => clear color ?

    - by jchatard
    I've setup some background colors for my Labels in order to position them. Now that they are well in place, I vould like to reset their background color to none, or clearColor. But I don't find any way to achieve this in IB, I don't gind any "no color" color... Any way to do this without re-coding color at runtime? Thanks, Jérémy

    Read the article

  • Using SDL to replace colors using SDL Color Keys

    - by Shawn B
    Hey, I am working an a simple Roguelike game, and using SDL as the display. The Graphics for the game is an image of Codepage 437, with the background being black, and the font white. Instead of using many seperate image files that are already colored, I want to use one image file, and replace the colors when it is being loaded into memory. The code to split the codepage into a sprite sheet works properly, but when attempting to print in color, everything comes out in white. I had it working the past, but somehow I broke the code when changing it from change the color at print, to change the color on load. Here is the code to load the image: SDL_Surface *Screen,*Font[2]; SDL_Rect Character[256]; Uint8 ScreenY,ScreenX; Uint16 PrintX,PrintY,ScreenSizeY,ScreenSizeX; Uint32 Color[2]; void InitDisplay() { if(SDL_Init(SDL_INIT_VIDEO) == -1) { printf("SDL Init failed\n"); return; } ScreenSizeY = 600; ScreenSizeX = 800; Screen = SDL_SetVideoMode(ScreenSizeX,ScreenSizeY,32,SDL_HWSURFACE | SDL_RESIZABLE); SDL_WM_SetCaption("Alpha",NULL); SDL_Surface *Load; Load = IMG_Load("resource/font.png"); Font[0] = SDL_DisplayFormat(Load); SDL_FreeSurface(Load); Color[0] = SDL_MapRGB(Font[0]->format,255,255,255); Color[1] = SDL_MapRGB(Font[0]->format,255,0,0); Uint8 i,j,k = 0; PrintX = 0; PrintY = 0; for(i = 0; i < 16; i++) { for(j = 0; j < 16; j++) { Character[k].x = PrintX; Character[k].y = PrintY; Character[k].w = 8; Character[k].h = 12; k++; PrintX += 8; } PrintX = 0; PrintY += 12; } PrintX = 0; PrintY = 0; for(i = 1; i < 2; i++) { Font[i] = SDL_DisplayFormat(Font[0]); SDL_SetColorKey(Font[i],SDL_SRCCOLORKEY,Color[i]); SDL_FillRect(Font[i],&Font[i]->clip_rect,Color[i]); SDL_BlitSurface(Font[0],NULL,Font[i],NULL); SDL_SetColorKey(Font[0],0,Color[0]); } } The problem is with the last for loop above. I can't figure out why it isn't working. Any help is greatly appreciated!

    Read the article

  • Determining your websites color scheme

    - by Steve Hayes
    One of the biggest issues I have, from a UI standpoint, when building a new website is figuring out what colors I will use and of those colors, do they actually work well together. I found this site that has really helped me out and I figured I would share it with all of you and also get some responses back about either sites similar or other ways that you get/figure out your color schemes. Here is the site that I currently use: http://kuler.adobe.com/ With Adobe Kuler, you can chose a base color and it will suggest 5 colors, including your color, that go well with one another. You can, of course, modify the colors it chooses. Also,one of the main features I use, is the image color matching. You can upload an image and it will determine a color scheme based on the colors of the image. So if you have a logo and want to use the colors of the logo, then this works perfectly for you. Thank you and I look forward to your feedback!

    Read the article

  • Color scheme: Smooth Dark

    - by xsl
    As requested by James McNellis I exported my Visual Studio color scheme and posted it here. It is basically the default Visual Studio color scheme with a dark background and slightly modified colors. Visual Studio 2010 Download: http://www.file-upload.net/download-2588083/Smooth-Dark.vssettings.html Installation: Select Tools > Import and Export Settings. Choose Import Selected Environment Settings. Select the file you downloaded. Import only the color settings. Click Finish. Console2 Installation In the file console.xml replace the color element with: <colors> <color id="0" r="23" g="27" b="32"/> <color id="1" r="120" g="150" b="180"/> <color id="2" r="139" g="163" b="137"/> <color id="3" r="119" g="181" b="181"/> <color id="4" r="181" g="122" b="119"/> <color id="5" r="186" g="141" b="183"/> <color id="6" r="168" g="171" b="129"/> <color id="7" r="182" g="182" b="182"/> <color id="8" r="114" g="114" b="114"/> <color id="9" r="120" g="150" b="180"/> <color id="10" r="139" g="163" b="137"/> <color id="11" r="119" g="181" b="181"/> <color id="12" r="181" g="122" b="119"/> <color id="13" r="186" g="141" b="183"/> <color id="14" r="168" g="171" b="129"/> <color id="15" r="255" g="255" b="255"/> </colors>

    Read the article

  • Generate Color Gradient in C#

    - by Ngu Soon Hui
    My question here is similar to the question here, except that I am working with C#. I have two colors, and I have a predefine steps. How to retrieve a list of Colors that are the gradients between the two? This is an approach that I tried, which didn't work: int argbMax = Color.Chocolate.ToArgb(); int argbMin = Color.Blue.ToArgb(); var colorList = new List<Color>(); for(int i=0; i<size; i++) { var colorAverage= argbMin + (int)((argbMax - argbMin) *i/size); colorList.Add(Color.FromArgb(colorAverage)); } If you try the above code, you will find that a gradual increase in argb doesn't correspond to a visual gradual increase in the color. Any idea on this?

    Read the article

  • Deferred rendering with VSM - Scaling light depth loses moments

    - by user1423893
    I'm calculating my shadow term using a VSM method. This works correctly when using forward rendered lights but fails with deferred lights. // Shadow term (1 = no shadow) float shadow = 1; // [Light Space -> Shadow Map Space] // Transform the surface into light space and project // NB: Could be done in the vertex shader, but doing it here keeps the // "light shader" abstraction and doesn't limit the number of shadowed lights float4x4 LightViewProjection = mul(LightView, LightProjection); float4 surf_tex = mul(position, LightViewProjection); // Re-homogenize // 'w' component is not used in later calculations so no need to homogenize (it will equal '1' if homogenized) surf_tex.xyz /= surf_tex.w; // Rescale viewport to be [0,1] (texture coordinate system) float2 shadow_tex; shadow_tex.x = surf_tex.x * 0.5f + 0.5f; shadow_tex.y = -surf_tex.y * 0.5f + 0.5f; // Half texel offset //shadow_tex += (0.5 / 512); // Scaled distance to light (instead of 'surf_tex.z') float rescaled_dist_to_light = dist_to_light / LightAttenuation.y; //float rescaled_dist_to_light = surf_tex.z; // [Variance Shadow Map Depth Calculation] // No filtering float2 moments = tex2D(ShadowSampler, shadow_tex).xy; // Flip the moments values to bring them back to their original values moments.x = 1.0 - moments.x; moments.y = 1.0 - moments.y; // Compute variance float E_x2 = moments.y; float Ex_2 = moments.x * moments.x; float variance = E_x2 - Ex_2; variance = max(variance, Bias.y); // Surface is fully lit if the current pixel is before the light occluder (lit_factor == 1) // One-tailed inequality valid if float lit_factor = (rescaled_dist_to_light <= moments.x - Bias.x); // Compute probabilistic upper bound (mean distance) float m_d = moments.x - rescaled_dist_to_light; // Chebychev's inequality float p = variance / (variance + m_d * m_d); p = ReduceLightBleeding(p, Bias.z); // Adjust the light color based on the shadow attenuation shadow *= max(lit_factor, p); This is what I know for certain so far: The lighting is correct if I do not try and calculate the shadow term. (No shadows) The shadow term is correct when calculated using forward rendered lighting. (VSM works with forward rendered lights) With the current rescaled light distance (lightAttenuation.y is the far plane value): float rescaled_dist_to_light = dist_to_light / LightAttenuation.y; The light is correct and the shadow appears to be zoomed in and misses the blurring: When I do not rescale the light and use the homogenized 'surf_tex': float rescaled_dist_to_light = surf_tex.z; the shadows are blurred correctly but the lighting is incorrect and the cube model is no longer lit Why is scaling by the far plane value (LightAttenuation.y) zooming in too far? The only other factor involved is my world pixel position, which is calculated as follows: // [Position] float4 position; // [Screen Position] position.xy = input.PositionClone.xy; // Use 'x' and 'y' components already homogenized for uv coordinates above position.z = tex2D(DepthSampler, texCoord).r; // No need to homogenize 'z' component position.z = 1.0 - position.z; position.w = 1.0; // 1.0 = position.w / position.w // [World Position] position = mul(position, CameraViewProjectionInverse); // Re-homogenize position (xyz AND w, otherwise shadows will bend when camera is close) position.xyz /= position.w; position.w = 1.0; Using the inverse matrix of the camera's view x projection matrix does work for lighting but maybe it is incorrect for shadow calculation? EDIT: Light calculations for shadow including 'dist_to_light' // Work out the light position and direction in world space float3 light_position = float3(LightViewInverse._41, LightViewInverse._42, LightViewInverse._43); // Direction might need to be negated float3 light_direction = float3(-LightViewInverse._31, -LightViewInverse._32, -LightViewInverse._33); // Unnormalized light vector float3 dir_to_light = light_position - position; // Direction from vertex float dist_to_light = length(dir_to_light); // Normalise 'toLight' vector for lighting calculations dir_to_light = normalize(dir_to_light); EDIT2: These are the calculations for the moments (depth) //============================================= //---[Vertex Shaders]-------------------------- //============================================= DepthVSOutput depth_VS( float4 Position : POSITION, uniform float4x4 shadow_view, uniform float4x4 shadow_view_projection) { DepthVSOutput output = (DepthVSOutput)0; // First transform position into world space float4 position_world = mul(Position, World); output.position_screen = mul(position_world, shadow_view_projection); output.light_vec = mul(position_world, shadow_view).xyz; return output; } //============================================= //---[Pixel Shaders]--------------------------- //============================================= DepthPSOutput depth_PS(DepthVSOutput input) { DepthPSOutput output = (DepthPSOutput)0; // Work out the depth of this fragment from the light, normalized to [0, 1] float2 depth; depth.x = length(input.light_vec) / FarPlane; depth.y = depth.x * depth.x; // Flip depth values to avoid floating point inaccuracies depth.x = 1.0f - depth.x; depth.y = 1.0f - depth.y; output.depth = depth.xyxy; return output; } EDIT 3: I have tried the folloiwng: float4 pp; pp.xy = input.PositionClone.xy; // Use 'x' and 'y' components already homogenized for uv coordinates above pp.z = tex2D(DepthSampler, texCoord).r; // No need to homogenize 'z' component pp.z = 1.0 - pp.z; pp.w = 1.0; // 1.0 = position.w / position.w // Determine the depth of the pixel with respect to the light float4x4 LightViewProjection = mul(LightView, LightProjection); float4x4 matViewToLightViewProj = mul(CameraViewProjectionInverse, LightViewProjection); float4 vPositionLightCS = mul(pp, matViewToLightViewProj); float fLightDepth = vPositionLightCS.z / vPositionLightCS.w; // Transform from light space to shadow map texture space. float2 vShadowTexCoord = 0.5 * vPositionLightCS.xy / vPositionLightCS.w + float2(0.5f, 0.5f); vShadowTexCoord.y = 1.0f - vShadowTexCoord.y; // Offset the coordinate by half a texel so we sample it correctly vShadowTexCoord += (0.5f / 512); //g_vShadowMapSize This suffers the same problem as the second picture. I have tried storing the depth based on the view x projection matrix: output.position_screen = mul(position_world, shadow_view_projection); //output.light_vec = mul(position_world, shadow_view); output.light_vec = output.position_screen; depth.x = input.light_vec.z / input.light_vec.w; This gives a shadow that has lots surface acne due to horrible floating point precision errors. Everything is lit correctly though. EDIT 4: Found an OpenGL based tutorial here I have followed it to the letter and it would seem that the uv coordinates for looking up the shadow map are incorrect. The source uses a scaled matrix to get the uv coordinates for the shadow map sampler /// <summary> /// The scale matrix is used to push the projected vertex into the 0.0 - 1.0 region. /// Similar in role to a * 0.5 + 0.5, where -1.0 < a < 1.0. /// <summary> const float4x4 ScaleMatrix = float4x4 ( 0.5, 0.0, 0.0, 0.0, 0.0, -0.5, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.5, 0.5, 0.5, 1.0 ); I had to negate the 0.5 for the y scaling (M22) in order for it to work but the shadowing is still not correct. Is this really the correct way to scale? float2 shadow_tex; shadow_tex.x = surf_tex.x * 0.5f + 0.5f; shadow_tex.y = surf_tex.y * -0.5f + 0.5f; The depth calculations are exactly the same as the source code yet they still do not work, which makes me believe something about the uv calculation above is incorrect.

    Read the article

  • ActionScript Measuring Depth

    - by TheDarkIn1978
    i'm having a difficult time understanding how to control the z property of display objects. i know how depth works, but what i don't understand is how i can get the maximum depth, or the number at which the display object just disappears into the background. i assume depth is based on the stage's width and height, and that is why assigning the same depth of the same display object appars mismatched with different stage sizes. so how can i appropriately measure depth?

    Read the article

  • ActionScript Measuring 3D Depth

    - by TheDarkIn1978
    i'm having a difficult time understanding how to control the z property of display objects in a 3D space. i know how depth works, but what i don't understand is how i can get the maximum depth, or the number at which the display object just disappears into the background. i assume depth is based on the stage's width and height, and that is why assigning the same depth of the same display object appars mismatched with different stage sizes. so how can i appropriately measure depth?

    Read the article

  • Given a RGB color x, how to find the most contrasting color y?

    - by Arthur Wulf White
    I have to mark a certain item in a way that will make it stick-out in the background. I need it to be surrounded with the color that contrasts the background as much as possible so it will pop out and easily noticeable by the player. Lets say I know the background is color 'x', how do I find 'y' such that it will be very contrasting to 'x' and easy to notice in a background where 'x' is a dominant color? I first thought about inverting color 'x' and then I noticed that when 'x' is a medium shade of gray, if I invert 'x' to get 'y', then 'y' is also a medium shade of gray which does not work.

    Read the article

  • Emacs color-theme suitable for maximum readability when projected [closed]

    - by Julien Chastang
    I will be giving a lisp talk in a few days at a meetup I regularly attend. Attendees have complained in the past about my emacs color theme not being readable when projected. What is a emacs color-theme suitable for maximum readability when projected? Post "Q & A" update I did some experimentation and found these color themes to be acceptable for projection Blue Mood blackOnGray Dark Blue 2

    Read the article

  • 2-components color model

    - by Cyan
    RGB is the natural color model for OpenGL. But a lot of other color models exist. For example, CMY(K) for printers, YUV for JPEG, the little cousins YCbCr and YCoCg, HSL & HSV from the 70's, and so on. All these models tend to share a common property : they are based on 3 components. Therefore my question is : Does it exist a 2-components color model ? I'm surprised to not find any. I was expecting something along the line of Hue+light could exist. I guess it cannot be as "complete" as a true 3-components color model, but a fine-enough approximation will be good for my usecase. The end objective is to store the 2 components into a single BC5 texture (GL_COMPRESSED_RED_GREEN_RGTC2 in OpenGL). The 3rd component requires a second fetch into a second texture, which hurts performance.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >