Search Results

Search found 697 results on 28 pages for 'colour'.

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

  • Changing colour of types for VB.net in VS

    - by vdh_ant
    I am currently working on a VB.NET project and the hardest thing that I am having trouble with is that everything is black and blue. Having worked a lot with C#, I really like the way that types are colored differently. I have tried going in and having a look at the "Tools > Options > Fonts and Colors" and the various "User Types" under "Display Items" is set to a different colour but its not reflecting that colour in the text editor. Any assistance would be appreciated.

    Read the article

  • Cannot print certain colours on Ubuntu with HP Laser Printer

    - by ILMV
    We have a load of machines running Ubuntu in our office, they are either on 8.04 or 9.10. We have a server which connects a HP JetDirect that connects to a HP 3550 Colour Laser printer using CUPS. The problem we are having is we cannot print red, magenta or yellow at 100%, I've got a picture of the Ubuntu test page to demonstrate my problem: This is obviously a pretty big problem as we are constantly receiving documents with these colours and cannot successfully print them off, we cannot just switch the grayscale, our business depends on being able to print colour (seems trivial but we handle lots of artwork). We're using the recommended driver HP Color LaserJet 3550 footmatic/pxljr (recommended), there is another driver in the list labelled HP Color LaserJet 3550 footmatic/hpijs. These are production printers so need to make sure any setting change won't kick is in the nuts. It would appear HPIJS is for HP Inkjets, makes sense I guess. The problem doesn't occur in Windows. RESOLVED I've managed to solve the problem, I did indeed use the HPIJS driver (apparently for inkjets) but it seems to have worked, we're going to roll with it for now to see how we get on with it.

    Read the article

  • C# Problem with getPixel & setting RTF text colour accordingly

    - by m3n
    Heyo, I'm messing with converting images to ASCII ones. For this I load the image, use getPixel() on each pixel, then change insert a character with that colour into a richTextBox. Bitmap bmBild = new Bitmap(openFileDialog1.FileName.ToString()); // valid image int x = 0, y = 0; for (int i = 0; i <= (bmBild.Width * bmBild.Height - bmBild.Height); i++) { // Ändra text här richTextBox1.Text += "x"; richTextBox1.Select(i, 1); if (bmBild.GetPixel(x, y).IsKnownColor) { richTextBox1.SelectionColor = bmBild.GetPixel(x, y); } else { richTextBox1.SelectionColor = Color.Red; } if (x >= (bmBild.Width -1)) { x = 0; y++; richTextBox1.Text += "\n"; } x++; } GetPixel does return the correct colour, but the text only end up black. If I change this richTextBox1.SelectionColor = bmBild.GetPixel(x, y); to this richTextBox1.SelectionColor = Color.Red; It works fine. Why am I not getting the right colours? (I know it doesn't do the new lines properly, but I thought I'd get to the bottom of this issue first.) Thanks

    Read the article

  • OpenGL Colour Interpolation

    - by Will-of-fortune
    I'm currently working on an little project in C++ and OpenGL and am trying to implement a colour selection tool similar to that in photoshop, as below. However I am having trouble with interpolation of the large square. Working on my desktop computer with a 8800 GTS the result was similar but the blending wasn't as smooth. This is the code I am using: GLfloat swatch[] = { 0,0,0, 1,1,1, mR,mG,mB, 0,0,0 }; GLint swatchVert[] = { 400,700, 400,500, 600,500, 600,700 }; glVertexPointer(2, GL_INT, 0, swatchVert); glColorPointer(3, GL_FLOAT, 0, swatch); glDrawArrays(GL_QUADS, 0, 4); Moving onto my laptop with Intel Graphics HD 3000, this result was even worse with no change in code. I thought it was OpenGL splitting the quad into two triangles, so I tried rendering using triangles and interpolating the colour in the middle of the square myself but it still doesnt quite match the result I was hoping for. Any help would be appreciated. Thanks.

    Read the article

  • HTML Setting Active with different background colour

    - by danit
    Here is my HTML List: <ul id="navlist"> <li class="item1"><a href="#">One</a></li> <li class="item2"><a href="#">Two</a></li> <li class="item3"><a href="#">Three</a></li> <li class="item4"><a href="#">Four</a></li> <li class="item5"><a href="#">Five</a></li> <li class="item6"><a href="#">Six</a></li> </ul> Each .itemx has a different background colour, so I need the active state to take into account the class. Obviously something like: <li class="item6" id="active"><a href="#">Six</a></li> #active.item6 { background: red; } Would work but IE6 doesnt like chained items in CSS so doesnt work when other items are set out in the CSS. Can I do this with jQuery where each item has a different background colour when 'active?

    Read the article

  • When is it appropriate to use colour in a command-line application?

    - by marcoms
    Currently I have a command-line application in C called btcwatch. It has a -C option that it can receive as an argument that compares the current price of Bitcoin with a price that was stored beforehand with -S. Example output with this option is: $ btcwatch -vC # -v = verbose buy: UP $ 32.000000 USD (100.000000 -> 132.000000) sell: UP $ 16.000000 USD (100.000000 -> 116.000000) The dilemma is whether to use colour for the UP or DOWN string (green and red, respectively). Most command-line applications I know of (apart from git) stay away from colour in their output. In my desire for btcwatch to look and be quite "standard" (use of getopt, Makefiles, etc), I'm not sure if colour would look out of place in this situation.

    Read the article

  • Preview colours in Emacs-ESS

    - by aL3xa
    I accidentally managed to get colour names, #HEX, and a colour preview in Emacs-ESS. Don't have a bloody idea how, must've pressed some keybinding or menu item... But, now I can't seem to find where's that feature... I'm quite sure I wasn't hallucinating, so it's gotta be there, under some keystroke that I can't reproduce!!! =) Thanks in advance!

    Read the article

  • HP Colour LaserJet Printer Hard Drive

    - by Jon Rhoades
    We are struggling to print Student's Theses on our HP CLJ CP4025 Printers (It will only let us print 1 at a time & typically they need multiple copies). Supposedly the solution is to install the optional Hard Drive. My question is: a) Does a hard drive on the printer make a significant difference? b) Can we use any old hard drive or do we have to use the rather pricey HP High performance EIO units?

    Read the article

  • Stopping windows changing colour scheme

    - by dave
    Windows keeps saying my computer is low on memory and changing the aero scheme to basic its really annoying I have 16gb of ram and 2 3gb 6970 gpu's i have no issues at all with anything expect from this my motherboard has a intel hd onboard gpu i think its something to do with this but all my settings are correct. Is there anyway to tell it not to change it without asking me or to tell it how much memory is too low its driving me mad.

    Read the article

  • Gimp: change one colour to another?

    - by AP257
    Simple to explain: possibly not so simple to do. In Gimp, I have a green button GIF image: it shades from dark green to light green, against a transparent background. I would like to change it to blue, and keep the shading, so it shades from dark blue to light blue. Anyone know how I can do this? Can't find an explanation by Googling! Thanks.

    Read the article

  • JTable .. colour of selected row

    - by dimitar
    Hello pip`s, I have a JTable in Java that has a custom dataMOdel and custom renderer. Now when i select some cell it has a dark blue border around it. I want the selected row to be all highlighted in some colour. How to do that?

    Read the article

  • selecting a colour theme in the .emacs configuration

    - by robUK
    Hello, GNU Emacs 23.1.1 Fedora 13 I can select the colour theme by M-x color-theme-select I scroll down and select the clarity and beauty This works ok. However, in my configuration I am not sure how to select this. This is what I have, but doesn't work. (require 'color-theme) (color-theme-ClarityandBeauty) many thanks for any suggestions,

    Read the article

  • HLSL How can one pass data between shaders / read existing colour value?

    - by RJFalconer
    Hello all, I have 2 HLSL ps2.0 shaders. Simplified, they are: Shader 1 Reads texture Outputs colour value based on this texture Shader 2 Needs to read in existing colour (or have it passed in/read from a register) Outputs the final colour which is a function of the previous colour (They need to be different shaders as I've reached the maximum vertex-shader outputs for 1 shader) My problem is I cannot work out how Shader 2 can access the existing fragment/pixel colour. Is the only way for shaders to interact really just the alpha blending options? These aren't sufficient if I want to use the colour as input to my function.

    Read the article

  • PIL saves image colour wrong

    - by Tom Viner
    I have an image. I want to resize it using PIL, but it come out like this. Even without a resize it still messes up the colour. Minimal code: from PIL import Image import os import urllib import webbrowser orig_url = 'http://mercedesclub.org.uk/images/stackoverflow-question/least-popular-colours-_-500-x-500.jpg' temp_fn, _ = urllib.urlretrieve(orig_url) im = Image.open(temp_fn) fn = os.tempnam() + '.jpg' im.save(fn) webbrowser.open(fn) I've tried Image.open(temp_fn).convert(format) with 'RGB', 'CMYK' and 'L' as formats, but still get weirdly coloured or grey results. When I load the image from my hard drive and I can see: >>>im.info {'adobe': 100, 'progression': 1, 'exif': 'Exif\x00\x00MM\x00*...\x7f\xff\xd9', 'adobe_transform': 100} >>>im.format 'JPEG' >>>im.mode 'CMYK' >>> im._getexif() {40961: 65535, 40962: 500, 40963: 500, 296: 2, 34665: 164, 274: 1, 305: 'Adobe Photoshop CS Macintosh', 306: '2010:02:26 12:46:54', 282: (300, 1), 283: (300, 1)} Thanks and let me know if you need any more data.

    Read the article

  • Can't set background colour for UIView from ViewController

    - by Curyous
    I have the following code in the view controller: - (void)viewDidLoad { [super viewDidLoad]; ThemeManager *themer = [ThemeManager sharedInstance]; UIView *theView = self.view; UIColor *forBackground = [themer backgroundColour]; [theView setBackgroundColor:forBackground]; } but when execution gets to the setBackgroundColor line, I get the following error: *** -[NSCFNumber CGColor]: unrecognized selector sent to instance 0x1237c40 *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSCFNumber CGColor]: unrecognized selector sent to instance 0x1237c40' There's got to be something simple that I'm doing wrong, how do I set the background colour? Do I have to subclass the view and do it in there? I'd prefer not to have the extra class, even though that is better separation of the whole model/view/controller thing. Update: value returned by [themer backgroundColour] is constructed using colorWithPatternImage:, could this make a difference?

    Read the article

  • Using Cases to change background colour | Visual Studio 2008

    - by Simon
    I really need help working with cases, I'm only learning it so far, but just can't get a drop down menu to work that would change the background of a Textbox. Private Sub cbColours_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cbColours.SelectedIndexChanged Select Case colours Case Is = "Red" txtSpace.BackColor = Color.Red Case Is = "Blue" txtSpace.BackColor = Color.Blue Case Is = "Green" txtSpace.BackColor = Color.Green End Select End Sub It isn't doing anything at all... In the dropdown menu, it has Red, Blue and Green one per line When the value (e.g. Green) is clicked, it will then change the Textbox to the colour selected. Many help appreciated :)

    Read the article

  • Colour manipulation of custom tags in niceEdit HTML editor ( JS / DOM )

    - by Chris
    Hi, I would like to be able to highlight, during typing and in real time, certain custom tags in the format #tag_name# within the text of a nicEdit instance ( http://nicedit.com/ ). My current attempt to implement as close to this as possible revolves around using the blur event of the editor to highlight the tags once the editor loses focus. I then use the following logic to wrap the tags in a span with a highlight class.. htmlEditor.addEvent( "blur", function( ) { str = nicEditors.findEditor( "html_content" ).getContent( ); // Remove existing spans first, leaving just the tag ( this could mess up if the html has been edited directly ) str = str.replace( /(<span class=\"highlight\">)(.[^<]+)(<\/span>)/gi, "$2" ); // Then wrap all instances of a particular tag with the highlight span str = str.replace( /#tag_name#/gi, "<span class='highlight'>#tag_name#</span>" ); nicEditors.findEditor( "html_content" ).setContent( str ); }); This is not ideal as my actual text now contains unwanted spans ( I only want the highlighting for the user's input experience, not to be saved to the database ). Obviously I could remove the spans before saving the text but the whole system is currently open to errors ( If the html is directly edited then other text may get highlighted etc ). What I would like to know is.. Is there any way to directly change the colour of the tags in the editor or DOM without using a mechanism such as this? Perhaps a way of colouring the text in memory rather than changing the HTML ? Any ideas ? Regards Chris P

    Read the article

  • Conditionally colour data points outside of confidence bands in R

    - by D W
    I need to colour datapoints that are outside of the the confidence bands on the plot below differently from those within the bands. Should I add a separate column to my dataset to record whether the data points are within the confidence bands? Can you provide an example please? Example dataset: ## Dataset from http://www.apsnet.org/education/advancedplantpath/topics/RModules/doc1/04_Linear_regression.html ## Disease severity as a function of temperature # Response variable, disease severity diseasesev<-c(1.9,3.1,3.3,4.8,5.3,6.1,6.4,7.6,9.8,12.4) # Predictor variable, (Centigrade) temperature<-c(2,1,5,5,20,20,23,10,30,25) ## For convenience, the data may be formatted into a dataframe severity <- as.data.frame(cbind(diseasesev,temperature)) ## Fit a linear model for the data and summarize the output from function lm() severity.lm <- lm(diseasesev~temperature,data=severity) jpeg('~/Desktop/test1.jpg') # Take a look at the data plot( diseasesev~temperature, data=severity, xlab="Temperature", ylab="% Disease Severity", pch=16, pty="s", xlim=c(0,30), ylim=c(0,30) ) title(main="Graph of % Disease Severity vs Temperature") par(new=TRUE) # don't start a new plot ## Get datapoints predicted by best fit line and confidence bands ## at every 0.01 interval xRange=data.frame(temperature=seq(min(temperature),max(temperature),0.01)) pred4plot <- predict( lm(diseasesev~temperature), xRange, level=0.95, interval="confidence" ) ## Plot lines derrived from best fit line and confidence band datapoints matplot( xRange, pred4plot, lty=c(1,2,2), #vector of line types and widths type="l", #type of plot for each column of y xlim=c(0,30), ylim=c(0,30), xlab="", ylab="" )

    Read the article

  • GLSL, is it possible to offsetting vertices based on height map colour?

    - by Rob
    I am attempting to generate some terrain based upon a heightmap. I have generated a 32 x 32 grid and a corresponding height map - In my vertex shader I am trying to offset the position of the Y axis based upon the colour of the heightmap, white vertices being higher than black ones. //Vertex Shader Code #version 330 uniform mat4 modelMatrix; uniform mat4 viewMatrix; uniform mat4 projectionMatrix; uniform sampler2D heightmap; layout (location=0) in vec4 vertexPos; layout (location=1) in vec4 vertexColour; layout (location=3) in vec2 vertexTextureCoord; layout (location=4) in float offset; out vec4 fragCol; out vec4 fragPos; out vec2 fragTex; void main() { // Retreive the current pixel's colour vec4 hmColour = texture(heightmap,vertexTextureCoord); // Offset the y position by the value of current texel's colour value ? vec4 offset = vec4(vertexPos.x , vertexPos.y + hmColour.r, vertexPos.z , 1.0); // Final Position gl_Position = projectionMatrix * viewMatrix * modelMatrix * offset; // Data sent to Fragment Shader. fragCol = vertexColour; fragPos = vertexPos; fragTex = vertexTextureCoord; } However the code I have produced only creates a grid with none of the y vertices higher than any others.

    Read the article

  • Regular expression from font to span (size and colour) and back (VB.NET)

    - by chapmanio
    Hi, I am looking for a regular expression that can convert my font tags (only with size and colour attributes) into span tags with the relevant inline css. This will be done in VB.NET if that helps at all. I also need a regular expression to go the other way as well. To elaborate below is an example of the conversion I am looking for: <font size="10">some text</font> To then become: <span style="font-size:10px;">some text</span> So converting the tag and putting a "px" at the end of whatever the font size is (I don't need to change/convert the font size, just stick px at the end). The regular expression needs to cope with a font tag that only has a size attribute, only a color attribute, or both: <font size="10">some text</font> <font color="#000000">some text</font> <font size="10" color="#000000">some text</font> <font color="#000000" size="10">some text</font> I also need another regular expression to do the opposite conversion. So for example: <span style="font-size:10px;">some text</span> Will become: <font size="10">some text</font> As before converting the tag but this time removing the "px", I don't need to worry about changing the font size. Again this will also need to cope with the size styling, font styling, and a combination of both: <span style="font-size:10px;">some text</span> <span style="color:#000000;">some text</span> <span style="font-size:10px; color:#000000;">some text</span> <span style="color:#000000; font-size:10px;">some text</span> I apprecitate this is a lot to ask, I am hopeless with regular expressions and need to find a way of making these conversions in my code. Thanks so much to anyone that can/is willing to help me!

    Read the article

  • need prefuse graph edges like arrows

    - by merve
    Hello, I did my homework and searched both google for a sample and a topic that is answered before on stackoverflow. But nothing has been found. My problem is ordinary edges who does not have a view like arrows. Here is what i do to hope there is forward arrows from target to destination: LabelRenderer nameLabel = new LabelRenderer("name"); nameLabel.setRoundedCorner(8, 8); DefaultRendererFactory rendererFactory = new DefaultRendererFactory(nameLabel); EdgeRenderer edgeRenderer; edgeRenderer = new EdgeRenderer(prefuse.Constants.EDGE_TYPE_LINE, prefuse.Constants.EDGE_ARROW_FORWARD); rendererFactory.setDefaultEdgeRenderer(edgeRenderer); vis.setRendererFactory(rendererFactory); Here is what i see about colour of edges, hoping these must not be transparent: int[] palette = new int[]{ColorLib.rgb(255, 180, 180), ColorLib.rgb(190, 190, 255)}; DataColorAction fill = new DataColorAction("socialnet.nodes", "gender", Constants.NOMINAL, VisualItem.FILLCOLOR, palette); ColorAction text = new ColorAction("socialnet.nodes", VisualItem.TEXTCOLOR, ColorLib.gray(0)); ColorAction edges = new ColorAction("socialnet.edges", VisualItem.STROKECOLOR, ColorLib.gray(200)); ColorAction arrow = new ColorAction("socialnet.edges", VisualItem.FILLCOLOR, ColorLib.gray(200)); ActionList colour = new ActionList(); colour.add(fill); colour.add(text); colour.add(edges); colour.add(arrow); vis.putAction("colour", colour); Thus, i wonder where am i wrong? Why my edges do not seem like arrows? Thanks for any idea. For more detail, i want to paste all of the code: /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package prefusedeneme; import javax.swing.JFrame; import prefuse.data.*; import prefuse.data.io.*; import prefuse.Display; import prefuse.Visualization; import prefuse.render.*; import prefuse.util.*; import prefuse.action.assignment.*; import prefuse.Constants; import prefuse.visual.*; import prefuse.action.*; import prefuse.activity.*; import prefuse.action.layout.graph.*; import prefuse.controls.*; import prefuse.data.expression.Predicate; import prefuse.data.expression.parser.ExpressionParser; public class SocialNetworkVis { public static void main(String argv[]) { // 1. Load the data Graph graph = null; /* graph will contain the core data */ try { graph = new GraphMLReader().readGraph("socialnet.xml"); /* load the data from an XML file */ } catch (DataIOException e) { e.printStackTrace(); System.err.println("Error loading graph. Exiting..."); System.exit(1); } // 2. prepare the visualization Visualization vis = new Visualization(); /* vis is the main object that will run the visualization */ vis.add("socialnet", graph); /* add our data to the visualization */ // 3. setup the renderers and the render factory // labels for name LabelRenderer nameLabel = new LabelRenderer("name"); nameLabel.setRoundedCorner(8, 8); /* nameLabel decribes how to draw the data elements labeled as "name" */ // create the render factory DefaultRendererFactory rendererFactory = new DefaultRendererFactory(nameLabel); EdgeRenderer edgeRenderer; edgeRenderer = new EdgeRenderer(prefuse.Constants.EDGE_TYPE_LINE, prefuse.Constants.EDGE_ARROW_FORWARD); rendererFactory.setDefaultEdgeRenderer(edgeRenderer); vis.setRendererFactory(rendererFactory); // 4. process the actions // colour palette for nominal data type int[] palette = new int[]{ColorLib.rgb(255, 180, 180), ColorLib.rgb(190, 190, 255)}; /* ColorLib.rgb converts the colour values to integers */ // map data to colours in the palette DataColorAction fill = new DataColorAction("socialnet.nodes", "gender", Constants.NOMINAL, VisualItem.FILLCOLOR, palette); /* fill describes what colour to draw the graph based on a portion of the data */ // node text ColorAction text = new ColorAction("socialnet.nodes", VisualItem.TEXTCOLOR, ColorLib.gray(0)); /* text describes what colour to draw the text */ // edge ColorAction edges = new ColorAction("socialnet.edges", VisualItem.STROKECOLOR, ColorLib.gray(200)); ColorAction arrow = new ColorAction("socialnet.edges", VisualItem.FILLCOLOR, ColorLib.gray(200)); /* edge describes what colour to draw the edges */ // combine the colour assignments into an action list ActionList colour = new ActionList(); colour.add(fill); colour.add(text); colour.add(edges); colour.add(arrow); vis.putAction("colour", colour); /* add the colour actions to the visualization */ // create a separate action list for the layout ActionList layout = new ActionList(Activity.INFINITY); layout.add(new ForceDirectedLayout("socialnet")); /* use a force-directed graph layout with default parameters */ layout.add(new RepaintAction()); /* repaint after each movement of the graph nodes */ vis.putAction("layout", layout); /* add the laout actions to the visualization */ // 5. add interactive controls for visualization Display display = new Display(vis); display.setSize(700, 700); display.pan(350, 350); // pan to the middle display.addControlListener(new DragControl()); /* allow items to be dragged around */ display.addControlListener(new PanControl()); /* allow the display to be panned (moved left/right, up/down) (left-drag)*/ display.addControlListener(new ZoomControl()); /* allow the display to be zoomed (right-drag) */ // 6. launch the visualizer in a JFrame JFrame frame = new JFrame("prefuse tutorial: socialnet"); /* frame is the main window */ frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.add(display); /* add the display (which holds the visualization) to the window */ frame.pack(); frame.setVisible(true); /* start the visualization working */ vis.run("colour"); vis.run("layout"); } }

    Read the article

  • In GLSL is it possible to offset vertices based on height map colour?

    - by Rob
    I am attempting to generate some terrain based upon a heightmap. I have generated a 32 x 32 grid and a corresponding height map - In my vertex shader I am trying to offset the position of the Y axis based upon the colour of the heightmap, white vertices being higher than black ones. //Vertex Shader Code #version 330 uniform mat4 modelMatrix; uniform mat4 viewMatrix; uniform mat4 projectionMatrix; uniform sampler2D heightmap; layout (location=0) in vec4 vertexPos; layout (location=1) in vec4 vertexColour; layout (location=3) in vec2 vertexTextureCoord; layout (location=4) in float offset; out vec4 fragCol; out vec4 fragPos; out vec2 fragTex; void main() { // Retreive the current pixel's colour vec4 hmColour = texture(heightmap,vertexTextureCoord); // Offset the y position by the value of current texel's colour value ? vec4 offset = vec4(vertexPos.x , vertexPos.y + hmColour.r, vertexPos.z , 1.0); // Final Position gl_Position = projectionMatrix * viewMatrix * modelMatrix * offset; // Data sent to Fragment Shader. fragCol = vertexColour; fragPos = vertexPos; fragTex = vertexTextureCoord; } However the code I have produced only creates a grid with none of the y vertices higher than any others. This is the C++ code that generates the grid and texture co-orientates which I believe to be correct as the texture is mapped to the grid, hence the white blob in the middle. The grid-lines are generated in the fragment shader, sorry for any confusion. I have tried multiplying the r value of hmColour by 1000 unfortunately that had no effect. The only other problem it could be is that the texture coordinate data is incorrect ? for (int z = 0; z < MAP_Z ; z++) { for(int x = 0; x < MAP_X ; x++) { //Generate Vertex Buffer vertexData[iVertex++] = float (x) * MAP_X; vertexData[iVertex++] = 0; vertexData[iVertex++] = -(float) (z) * MAP_Z; //Colour Buffer NOT NEEDED colourData[iColour++] = 255.0f; // R colourData[iColour++] = 1.0f; // G colourData[iColour++] = 0.0f; // B //Texture Buffer textureData[iTexture++] = (float ) x * (1.0f / MAP_X); textureData[iTexture++] = (float ) z * (1.0f / MAP_Z); } } The heightmap texture I am trying to use appears like so (without grid-lines). This is the corresponding fragment shader // Fragment Shader Code #version 330 uniform sampler2D hmTexture; layout (location=0) out vec4 fragColour; in vec2 fragTex; in vec4 pos; void main(void) { vec2 line = fragTex * 32; // Without Gridlines fragColour = texture(hmTexture,fragTex); // With grid lines // + mix(vec4(0.0, 0.0, 1.0, 0.0), vec4(1.0, 1.0, 1.0, 1.0), // smoothstep(0.05,fract(line.y), 0.99) * smoothstep(0.05,fract(line.x),0.99)); }

    Read the article

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