android,canvas,shadow,material-design,elevation
The method Android Lollipop is using for rendering shadows is pretty easy: draw black shape of a view blur it with ScriptIntrisincBlur draw it beneath the view You can apply this method to your shapes. I've implemented these steps in my library capable of drawing realtime shadows on all recent...
You can fake one, using background gradient and a box-shadow, as well as a css pseudo element to mask the border. Note that if you change the background color of the surrounding content you have to change every instance of #444 .outer { box-sizing: border-box; padding: 25px; height: 200px; width:...
The :r! command always works 'likewise', so it will not be able to insert any text inside a given line. You can assign the command's results into a 'register' (vim's places to hold characters yanked, cut, etc) using: :let @a=system("your_command") and then place the contents of the register (your passed)...
android,shadow,floating-action-button
Override the default elevation of the FAB by adding: android:elevation="0dp" Or in code call View.setElevation(float)...
opengl,textures,glsl,shadow,plane
I would go for the following idea: for each pixel in the range of your light yo will want to do a trace to the light origin and test if there is no black pixel on the path. It will look more or less like that: bool inTheShadow = false;...
try with bellow code that might be helps to you myView.layer.shadowColor = [UIColor purpleColor].CGColor; myView.layer.shadowOffset = CGSizeMake(5, 5); myView.layer.shadowOpacity = 1; myView.layer.shadowRadius = 1.0; I tested this code and that working and output is:- ...
ios,objective-c,calayer,shadow
I tried your code last night, i even made an animation of on and off switch out of your code before i went to sleep.. haha.. The question: Can I not change shadowColor multiple times?, of course you can.. ;) The only potential reason why your layer is not updating...
Using this as the background for your button might help, change the color to your needs <?xml version="1.0" encoding="utf-8" ?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" > <shape android:shape="rectangle"> <solid android:color="@color/app_theme_light" /> <padding android:left="8dp" android:top="4dp" android:right="8dp" android:bottom="4dp" /> </shape> </item> <item> <shape android:shape="rectangle"> <solid...
ios,objective-c,swift,shadow,quartz-core
Check out the WWDC 2014 video 'Advanced Graphics and Animations for iOS Apps'. https://developer.apple.com/videos/wwdc/2014/ 35:50 in ... it talks about why using that type of code to generate a shadow causes extra off screen passes for the GPU as it figures out the shape of the shadow. The suggested solution...
android,shadow,android-elevation
I've been playing around with shadows on Lollipop for a bit and this is what I've found: It appears that a parent ViewGroup's bounds cutoff the shadow of its children for some reason; and shadows set with android:elevation are cutoff by the View's bounds, not the bounds extended through the...
When calling to CGContextSetTextDrawingMode, set the drawing mode to kCGTextFill. To my understanding, the shadow you see is casted by the stroke of the text.
It depends on exactly what you want to do (the order matters), but you can e.g combine the two filters into one, like this: <filter id="inset-and-drop-shadow" primitiveUnits="objectBoundingBox" x="0%" y="0%"> <feOffset dx="0.01" dy="0.02" /> <feGaussianBlur stdDeviation="0.01" result="offset-blur" /> <feComposite operator="out" in="SourceGraphic" in2="offset-blur" result="inverse" /> <feFlood flood-color="black" flood-opacity="1" result="color" /> <feComposite operator="in"...
Well for a start, you are applying the filter to every path element in the file. You only want to apply it to the parent <g>. Move the filter from <path> and apply it only to the <g>. path { stroke: #666666; stroke-width: 0.1; } g { filter:url(#drop-shadow); } I...
opengl,shadow,rectangles,alphablending,immediate-mode
This is relatively easy to do with geometry. Create the vertices for two rounded rectangles: an inner one and an outer one. Assign an alpha of 1 to the inner rectangle, and an alpha of 0 to the outer rectangle. Triangulate both the inner rectangle and the space between the...
because of the [self.testLabel.layer setMasksToBounds:YES]; this method will make the shadow invisible, you can make a shadow image with a png/jpg formate, and put a imageview that had set the image below your textLabel to make it work.. and also you should set the opacity to 1.. // self.testLabel.backgroundColor =...
There is actually a very in-depth tutorial on shadow mapping with the programmable pipeline, check out Tutorial 16: Shadow mapping A quote on the site about Point lights: Point lights Same thing, but with depth cubemaps. A cubemap is a set of 6 textures, one on each side of >a...
html,css,colors,background-color,shadow
It's not a question for stackoverflow, anyway, why don't you go with the giraffe color and a smooth shadow? <h1 style="background-color:#FFFFFF;font-family:'HelveticaNeue-Light', 'Helvetica Neue Light', 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;font-weight:300;font-size:27px;letter-spacing:2px;text-shadow: 2px 2px 1px rgba(0,0,0, .4);color: #f8bf63;text-align:center;letter-spacing:2px;border:2px solid;border-radius:25px;border-color:#CCCC99;box-shadow:10px 5px 5px...
android,android-support-library,shadow,floating-action-button
You can check out this fab library here here at GitHub. The library allows you to set ripple effect colour on the fab. <com.melnykov.fab.FloatingActionButton android:id="@+id/fab" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom|right" android:layout_margin="16dp" android:src="@drawable/ic_action_content_new" fab:fab_colorNormal="@color/primary" fab:fab_colorPressed="@color/primary_pressed" fab:fab_colorRipple="@color/ripple" /> ...
google-maps,primefaces,shadow,markers
The Marker Shadows were removed in version 3.14 of the Google Maps Javascript API. Any shadows specified programmatically will be ignored. It is from the official Google Documentation: https://developers.google.com/maps/documentation/javascript/markers#complex_icons...
c++,opengl,glsl,shadow,shadow-mapping
Disable texture comparison for one thing. That's only valid when used with sampler2DShadow and you clearly are not using that in your code because your texture coordinates are 2D. This means replacing the following code: m_glFunctions->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL); m_glFunctions->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_R_TO_TEXTURE); With this instead: m_glFunctions->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_NONE); Likewise, using GL_LINEAR...
objective-c,uibutton,ios8,shadow
Since you offset the shadow by {4, 4} the shadow appears on the bottom-right side of the button. You could set a zero offset : myButton.layer.shadowOffset = CGSizeZero and by tweaking the shadowRadius you might achieve what you want. Here is how a shadow is built: (1st row) start from...
So it turns out that android:hardwareAccelerated option needs to be true if shadows are to be rendered in Lollipop devices. Note that setting the flag isn't necessary as it's the default option for 4.0 devices (API Level 14) and higher. It's available on Android 3.X but is disabled by default....
Paul and Robert mean the following: <filter id="drop-shadow" primitiveUnits="objectBoundingBox"> <feGaussianBlur in="SourceAlpha" stdDeviation="0.09"/> <feOffset dx="0.52" dy="0.02" result="offsetblur"/> <feFlood flood-color="#000000"/> <feComposite in2="offsetblur" operator="in"/> <feMerge> <feMergeNode/> <feMergeNode in="SourceGraphic"/> </feMerge> </filter> That is a very big blur and a very big offset in % terms, so you're going to have to expand the filter...
sprite-kit,shadow,skspritenode,sklightnode
I just heard back from Apple Developer Technical Support confirming this is a bug in SpriteKit (SKLightNode). Currently they do not know of a workaround for this issue but will update me if one is found. As per their request, I have filed a bug report. UPDATE April 22, 2015...
It is possible, but I guess the result is not what you expect. With -webkit-background-clip: text; you actually cut put a piece of the background in the shape of your text and with color:transparent you make the text itself invisible. So what you see here is actually the background. That...
I do not have an answer to your question, however I have a workaround: Render your scene and keep the image in memory Change all the materials in your object for pure black, no specular Change the plane and the sky to a fully white material, lights to white Render...
Try like this: Demo I removed box shadow from #content and added to #menu as inner shadow. CSS: #menu { position:absolute; z-index:7; width:200px; height:100%; background:green; box-shadow:inset -10px 3px 10px rgba(0, 0, 0, .23), inset 0 3px 10px rgba(0, 0, 0, .16); overflow:hidden; } #menu a.active { padding:5px; background:#fff; display:block; margin-top:20px;...
ios,objective-c,cocoa-touch,uibutton,shadow
Just set the shadow on the titleLabel property of the UIButton rather than what you're doing now. eg button.titleLabel.shadowColor = ((selectionState) ?[UIColor orangeColor] : [UIColor clearColor] ); button.titleLabel.shadowOffset = CGSizeMake (1.5,1.5); ...
You can just do... https://jsfiddle.net/hs5g1osv/1/ .thumb_images { float: left; margin-right: 5px; cursor: pointer; } .thumb_images img { border: 5px solid #ccc; -webkit-transition: border .15s ease-in-out; transition: border .15s ease-in-out; } .thumb_images img:hover { border-color: #f00; } ...
javascript,webgl,shader,shadow
It looks like your shadow map is covering only a fraction of the scene, and is being tiled (repeated) to cover the rest. Change the wrapping mode for the shadow map to GL_CLAMP_TO_BORDER: glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER); And set your border color to 1.0f or 0.0f, depending on...
c++,opengl,3d,shadow,shadow-mapping
ShadowCoord = ProjectionMatrix * ShadowMatrix * WorldMatrix * vec4 (VertexPosition, 1); This calculates the position of this vertex within the eye space of the light. What you're recomputing is what the Position = ProjectionMatrix * ViewMatrix * WorldMatrix * vec4 (VertexPosition, 1); line must have produced back when you were...
Create a new drawable resource file. I named mine two_sided_border.xml. <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <!-- This is the line --> <item> <shape> <solid android:color="@color/black" /> </shape> </item> <!-- This is the main color --> <item android:bottom="2dp" android:right="2dp"> <shape> <solid android:color="@color/green" /> </shape> </item> </layer-list> Then use this as the...
class,mocking,shadow,robolectric
I guess robolectric does not know that your class should be shadowed ;) Here is how to tell robolectric that you will shadow some not android sdk classes. public class MyRobolectricTestRunner extends RobolectricTestRunner { @Override protected ClassLoader createRobolectricClassLoader(Setup setup, SdkConfig sdkConfig) { return super.createRobolectricClassLoader(new ExtraShadows(setup), sdkConfig); } class ExtraShadows extends...
You can change the alpha of a shadow by adjusting the alpha of the fill color it uses. For example: myObject.shadow = new createjs.Shadow("rgba(0,0,0,0.2)",200,200,15); It might also be worth taking a look at Graphics.getRGB()....
ios,objective-c,xcode,uiimageview,shadow
Perhaps, adding a shadow to the layer seems to work. You may want to try something like this: // perspectiveView.transform = CGAffineTransformMakeRotation(-50.0f); perspectiveView.layer.shadowOffset = CGSizeMake(10, 10); perspectiveView.layer.shadowRadius = 5.0; perspectiveView.layer.shadowOpacity = 0.6; perspectiveView.layer.masksToBounds = NO; You will need to playaround with these values to match your requirements. Hope this helps....
ios,objective-c,uilabel,shadow
I added this and the cut off went away: scoreLabel.textAlignment = NSTextAlignmentCenter; ...
c++,opengl,shader,shadow,shadow-mapping
You should read a grayscale depthtexture at the first component. texture(shadowMap, shadowCoord.xy).r or texture(shadowMap, shadowCoord.xy).x The Shadow Coordinates should be dehomogenized (divided by w) after interpolation. -> in fragment shader: shadowPos = shadowPos/shadowPos.w; If no other techniques like polygon offset is used you need to substract a bias from...
css,tabs,positioning,shadow,box-shadow
What about using pseudoelement :before (you have used alreasdy after) to make a little white rectangle to hide it? label:before { content:''; display:block; width:100%; height:15px; background-color:#fff; position:absolute; bottom:-11px; left:0; z-index:10; } Codepen...
javascript,shadow,custom-element
var $shadow = function(shadow, el, fn){ console.log(shadow); console.log(el); var children = shadow.children; console.log(children.length); for (var i = 0; i < children.length; i++) { var child = children[i]; console.log(children[i]); console.log('child '+child.id+', el '+el); if (child.id === el) { console.log('match'); return shadow.children[i].addEventListener('click', function(){ console.log(fn); fn(); }); break; } } } $shadow(shadow, 'd',...
You probably want a smaller radius (like [1; 3]). Then on iOS you also need to specify the number of sample using shadowSampleCount (because the default is only 1 sample on iOS which implies no blur). Beware that increasing the number of samples will improve the quality but it has...
javascript,three.js,shadow,stripes,directional-light
You are getting self-shadowing because the rays of the directional light are exactly parallel to some of the faces of your geometry. Move the directional light to a slightly different location. For example, directionalLight.position.set( 250, 500, 200 ); Usually, light.shadowBias is used to remedy self-shadowing problems, but it is not...
opengl,matrix,glsl,shadow,affinetransform
Helpful community members of ##OpenGL on Freenode pointed out my error. As the projection matrix MATRIX does not produce an affine transformation, I needed to divide the distance calculation by point.w. This yields the correct distance between LIGHT.xyz and point.xyz. In short, if you're working with a projection matrix like...
c++,opengl,graphics,shader,shadow
This is intended. Since your shadowmap covers a pyramid-like region in space, your spotlight's cone can be occluded by it. This is happening because where you render something that is outside of the shadow camera's view, it will be considered unlitten. Therefore the shadow camera's view pyramid will be visible....
c++,opencv,computer-vision,shadow
The implementation is explained in the paper A Statistical Approach for Real-time Robust Background Subtraction and Shadow Detection by Thanarat Horprasert David Harwood Larry S. Davis which is present in the reference of the above paper. The link below shows the formulas that are used for implementation. Click here for...
It turns out the issue was with blur: the background was using a blur filter and this created weird shadows. I am not sure why and how this was happening, though. I removed the blur and just blurred the actual BG image in Photoshop. It seems like I was encountering...